phylo4d-hasData {phylobase} | R Documentation |
Methods that test for the presence of data associated with trees stored as phylo4d objects.
## S4 method for signature 'phylo4d': hasNodeData(x) ## S4 method for signature 'phylo4d': hasTipData(x)
x |
a phylo4d object |
The outcome of the test is based on row names of the data frame stored
in data
. If there are no rows having row names from the set
nodeId(x, "tip")
, then hasTipData
returns FALSE.
Likewise, if there are no rows having row names from the set
nodeId(x, "internal")
, then hasNodeData
returns FALSE.
|
return TRUE or FALSE depending
whether data are associated with the tree (i.e., the slots
tip.data or node.data are not empty) |
signature(object = "phylo4d")
: whether
tree has internal node datasignature(object = "phylo4d")
: whether tree
has data associated with its tipsBen Bolker, Thibault Jombart, Francois Michonneau
phylo4d
constructor and phylo4d
class.
data(geospiza) hasTipData(geospiza) ## TRUE hasNodeData(geospiza) ## FALSE