phyloFrame: Tacks "phylo" variable onto data frame for 'gpf'

View source: R/phyloFrame.R

phyloFrameR Documentation

Tacks "phylo" variable onto data frame for gpf

Description

Tacks "phylo" variable onto data frame for gpf

Usage

phyloFrame(Data, grp, tree)

Arguments

Data

data table input to gpf. Must have column "Species"

grp

Group list element from getPhyloGroups

tree

phylo class object

Examples

library(phylofactor)
set.seed(1)
tree <- rtree(10)
Data <- data.table('Species'=tree$tip.label,'x'=rnorm(10),key='Species')
Grps <- getPhyloGroups(tree)
phylofactor:::phyloFrame(Data,Grps[[1]],tree)

grp <- list(c(1:3),c(5:6))
phyloFrame(Data,grp,tree)

reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.