Learn R Programming

data.tree (version 0.1.6)

as.data.frame.Node: Convert a Node to a data.frame

Description

Convert a Node to a data.frame

Usage

## S3 method for class 'Node':
as.data.frame(x, row.names = NULL, optional = FALSE, ...,
  filterFun = function(x) TRUE)

Arguments

x
The root node to convert to a data.frame
row.names
NULL or a character vector giving the row names for the data frame. Missing values are not allowed.
optional
logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional.
...
the attributes to be added as columns of the data.frame. There are various options:
  • a string corresponding to the name of a node attribute
  • the result of theNode$Getmethod
If a specific Node does not contain the attri
filterFun
a function which filters the Nodes added to the data.frame. The function must take a Node as an input, and it must return TRUE or FALSE, depending on whether the Node and its subtree should