# All changes to data.tree are documented here.

## Version 0.7.0
- ADD: ToDiagrammeRGraph to convert to a DiagrammeR graph object
- REMOVE: ToGraphViz (replaced with ToDiagrammeRGraph, to support the latest features in the DiagrammeR package). You can still get the dot representation by using DiagrammeR::generate_dot(ToDiagrammeRGraph(node))
- CHANGE: plot.Node 's last parameter is now 'graph', and not 'engine' anymore.
- FIX: minor typos fixed

## Version 0.6.2
- ADD: new Distance function to measure distance from one Node to another in the same tree

## Version 0.6.1
- IMPROVE: FromListSimple now accepts subclasses of lists (#79)
- IMPROVE: FromDataFrameTable now supports tibbles (#89)
- IMPROVE: print.Node and as.data.frame.Node now also work for node fields with length > 1 (#81)
- FIX: print.Node and as.data.frame.Node now also work if some Nodes have the same name as some fileds (#82)
- REMOVE: node$FindNode, and node$Navigate are now deprecated. Use FindNode(node, ...) and Naviate(node, ...) instead
- REMOVE: node$Sort, node$Prune, and node$Revert are now deprecated. Use Sort(node, ...), Prune(node, ...) and Revert(node, ...) instead

## Version 0.5.0
- IMPROVE: Performance improvement for many functions. For example, as.Node roughly by factor 4 for large dataset (#74)
- CHANGE: by default, as.data.frame.Node (and derivatives) do not format anymore (use the format parameter if you want to format)
- IMPROVE: Allow the possibility to keep only some fields when converting to list using as.list.Node (#76)
- FromDataFrameTable (#77)
  - FIX: now also works if there is only the pathString column
  - IMPROVE: pathString can now also be a factor (or any other type convertible to character)


## Version 0.4.0
- IMPROVE: as.Node.data.frame and FromDataFrameTable now support paths containing reserved words (#65)
- CHANGE: Node$new now checks that names are not reserved names. As a consequence, many conversions to Node now contain a check parameter.
- IMPROVE: Climb is now much faster when climbing by name (#71)
- IMPROVE: As a result of #71, many other functions are much faster, e.g. FromDataFrameTable (#72)


## Version 0.3.7
- ADD: Traverse can now also take custom function as a traversal argument
- ADD: Navigate method
- ADD: as.Node.BinaryTree Convert SplittingNode from party package to data.tree (#6)
- ADD: as.Node.party Convert party class from partykit package to data.tree (#6)

## Version 0.3.6
- FIX: GetDefaultTooltip now also works for attributes which are functions
- FIX: GetAttribute now returns attributes with length 0 (e.g. an empty list)
- ADD: Sort, Revert and Prune are now also available in traditional format (e.g. Prune(node, pruneFun))
- FIX: FromListSimple: Empty lists now become empty nodes (#59)
- IMPROVE: FromListSimple: Unnamed list elements are now also converted (#61)
- IMPROVE: documentation of Aggregate
- IMPROVE: Check type when setting Node$parent and Node$children (#63)


## Version 0.3.5
- FIX: minor correction in documentation

## Version 0.3.4
- FIX: minor correction in documentation

## Version 0.3.3
- CHANGE: Renamed Find method to FindNode, in order to avoid masking from base
- FIX: upgrade to latest version of treemap package
- FIX: a few typos in documentation


## Version 0.3.2
- ADD: FromListExplicit now interprets character vectors as a list of nodes (#58)


## Version 0.3.1
- IMPROVE: as.list.Node 
  - now generates auto name if unique name is not available (#54)
  - now has warn arg, warning if source data contains reserved names
  - now also imports fiels with names equal to reserved names (e.g. count), they will be renamed (to e.g. count2)
- CHANGE: node$leaves now returns a list even when called on a leaf itself
- ADD: Find method to find a single Node in a (sub-)tree (#52)

## Version 0.3.0 Pine Tree
- REMOVE: Removed the cacheAttribute parameter from Aggregate and Cumulate (they were confusing, even to me. Use Do instead to manually store aggregate values in the tree)
- ADD: plot function (see ?plot.Node)
- ADD: ToDataFrameTypeCol to export e.g. the path to columns by level in columns: ToDataFrameTypeCol(acme)
- ADD: Node$AddSibling
- ADD: Node$RemoveAttribute now contains a mandatory parameter so that it can be used if the node does not have the attribute to be removed.
- ADD: Get works on methods without args
- IMPROVE: FormatFixedDecimal and FormatPercent work for NULL values
- IMPROVE: Documentation
- FIX: Aggregate will not return attribute from callee anymore, but *always* aggregate children attributes
- FIX: Removed ... parameter from ToListExplicit and ToListSimple 
- FIX: Clone was adding empty children list, which caused a series of problems (#44)
- FIX: Cloning a subtree does not keep reference to un-cloned parent anymore (#49)
- FIX: print with limit parameter ignored formatter (#43)
- FIX: cannot rename to int, e.g. acme$Do(function(x) x$name <- x$position) (#53)


## Version 0.2.4
- FIX: applications vignette, changed from http://htmlwidgets.org to http://www.htmlwidgets.org, as requested by CRAN

## Version 0.2.3
- FIX #33: applications vignette doesn't build because of DiagrammeR update
- FIX #32: Cannot subclass Node
- FIX #30: strange errors when using data.tree multiple times

## Version 0.2.2
- FIX: Get can now fetch vectors and matrices too
- ADD: Node$siblings

## Version 0.2.0-rc.1 Elder

- ADD: ClimbByAttribute
- FIX: Aggregate and Cumulate now work always on attributes having a formatter
- ADD: as.igraph now has a 'directed' parameter
- ADD: print now has a pruneMethod, allowing different methods to avoid that a huge tree is printed to the console
- REMOVE: FromDataFrameTaxonomy and ToDataFrameTaxonomy (replaced by FromDataFrameNetwork and ToDataFrameNetwork, but with some differences)
- ADD: FromDataFrameNetwork and ToDataFrameNetwork
- IMPROVE: make Traversal "level" much faster
- ADD: Node$RemoveChild
- ADD: Node$RemoveAttribute
- ADD: as.igraph.Node now supports different directions (climb and descend)

## Version 0.1.9 Pine II

- Set correct version number in DESCRIPTION file

## Version 0.1.8 Pine

- Node
  - CHANGE: Node$depth is now called Node$height, as the old naming was confusing for many, because in CS, the Node$level is sometimes 
- Utils
  - CHANGE: Renamed CreateDummyTree to CreateRegularTree
  - CHANGE: Height renamed to DefaultPlotHeight, so as to avoid confusion with Node$height
  - ADD: CreateRandomTree to test trees
  - ADD: trees can now be climbed directly, e.g. acme$IT$`Go agile`
  - ADD: print.Node with limit parameter is now much faster
  - ADD: Clone is now much faster

## Version 0.1.7 Chestnut

- General
  - ADD: demo portfolio
  - ADD: demo decisiontree
  - ADD: demo population / treemap
- Node
  - CHANGE: Node$level is now 1-based (used to be: 0-based), i.e. if Node$isRoot then Node$level = 1
  - CHANGE: Node$Find is now called Node$Climb to avoid confusion with base::Find
called depth
  - ADD: print.Node contains a limit parameter, allowing to limit the max number of Nodes to be printed
  - ADD: Clone (returning a deep copy)
  - ADD: Prune (pruning the tree)
  - ADD: SetFromat (support for setting formatter functions on a Node)
  - ADD: Traverse, standalone traverse method that can be used for piping and whenever you need to apply multiple Get/Set/Do on the same traversal
  - ADD: Node$isBinary active
  - ADD: standalone versions of isLeaf, isNotLeaf, isRoot, isNotRoot for concise filtering
  - ADD: AreNamesUnique to test if names of the node's are unique throughout the tree (and not only among siblings)
  - FIX: node$position now returns 1 for root
  - ADD: Aggregate function now supports functions
  - ADD: node$averageBranchingFactor
  - CHANGE: Aggregate function does not cache anymore by default. See cacheAttribute for details.
  - Node$Get: 
    - CHANGE: Renamed filterFun parameter to pruneFun
    - ADD: new parameter filterFun, as opposed to pruneFun
    - CHANGE: removed the assign parameter (use Do instead)
    - ADD: new traversal modes "in-order", "level"
    - ADD: parameter inheritFromAncestors
  - Node$Set:
    - ADD: filterFun and pruneFun
    - ADD: support for traversal order
  - Node$Do:
    - ADD: new function Do, which applies a function to Nodes
- Conversions
  - ADD: conversion to and from list of lists (and thus to and from yaml, json, etc.)
  - ADD: conversion from data.frame
  - ADD: conversion to and from dendrogram
  - ADD: conversion to and from phylo from the ape package
  - ADD: conversion to Newick notation
  - ADD: conversion ToDataFrameTable (returning leafs only)
  - ADD: conversion ToDataFrameTree
  - ADD: conversion ToDataFrameTaxonomy
  - ADD: conversion to igraph
- Utils
  - CHANGE: Renamed PrintFixedDecimal to FormatFixedDecimal to achieve better consistency
  - ADD: CreateDummyTree to test large trees
  - ADD: CreateRandomTree to test trees