# All changes to data.tree are documented here.

## Version 1.1.0
- IMPROVE: Node names may no longer be `NA`.  It was not fully supported, and now it is an error. (#152)
- FIX: changed lock_object to lock_objects (#149 thx to Olly Beagly)
- FIX: help('data.tree') works again
- IMPROVE: FromListSimple and as.Node.list now have an additional parameter 'interpretNullAsList'. See #169 for details.
- IMPROVE: added parameter `row.names = FALSE`in `print.Node()` to hide row numbers when printing a data.tree.

## Version 1.0.0
- IMPROVE: Replaced dependency on stringr by dependency on stringi, which make data.tree even more light-weight
- CHANGE: Node serialization changed. In many cases, you might still be able to load previously saved data.tree objects, but then they do not correspond to the latest version.
- CHANGE: New reserved words for Node: attributes and attributesAll
- NOTE: Node$fields and Node$fieldsAll will be deprecated in the next version. Use Node$attributes and Node$attributesAll instead
- REMOVE: Deprecated Node$FindNode has been removed (use FindeNode(node, ...) instead)
- IMPROVE: Node is now fully documented, (thx to roxygen2 for supporting R6)
- CHANGE: data.tree now depends on R 3.5
- FIX: adjusted sample data that didn't support correct handling of active bindings
- IMPROVE: Adding reserved word check to FromDataFrameNetwork (#147 thx to wkumler)

## Version 0.7.11
- IMPROVE: diagrammeR is now only suggested, so data.tree is much more lightweight if plotting is not needed (#143 thx to Russ Hyde)
- FIX: plot now also works with quotations in names (#137 thx to thotal)
- IMPROVE: as.list and other conversions to list now contain pruneFun argument (#142)

## Version 0.7.10
- IMPROVE: various spell errors fixed in vignettes

## Version 0.7.9
- FIX: Bug in as.data.frame.Node: NA for certain lists slots (#135)
- FIX: Get prints Null as NA by default (#128)

## Version 0.7.8
- FIX: wrong export of S3

## Version 0.7.7
- IMPROVE: if an attribute of a node has n dimensions, then Get will return an array of dim n+1, with the names of the first dimension being equal to the node names (thanks to Chris Hammil)
- FIX: fieldsAll now doesn't simplify (thanks to Vaclav Slimacek)

## Version 0.7.6
- IMPROVE: plot now also works for trees with a single root node (thx to Pierre Neuvial)
- IMPROVE: ellipsis parameters are not passed to DiagrammeR for plotting (#109)
- FIX: Dependency on DiagrammeR (>= 1.0.0) explicitly stated (#111)
- IMPROVE: Allow tibble in FromDataFrameNetwork and FromDataFrameTable (#115)

## Version 0.7.5
- IMPROVE: namesNotUnique parameter in as.Node.phylo (#106)
- FIX: fixed incompatibility issue with DiagrammeR (#110)

## Version 0.7.4
- IMPROVE: print now has an explicit arg pruneFun
- FIX: partykit tests now pass
- FIX: DESCRIPTION now in line with latest changes from CRAN (rmarkdown declared)
- FIX: Skipped tests in testMethods included

## Version 0.7.3
- FIX: Various typos in documentation

## Version 0.7.2
Upgrade to R 3.4.x and newest package versions.
- FIX: plot: global graph attributes now work (#88)
- FIX: typo in vignette data.tree vignette('applications', package = "data.tree")
- FIX: warnings in as.dendrogram
- FIX: warnings in sample code for Do
- FIX: as.data.frame created warnings for values that were of length 0

## 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 https://htmlwidgets.org to https://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
