| ouwie_tidy | R Documentation | 
This function allows you to run OUwie across all combinations of trees, simmaps, models, and continuous traits and outputs analyses in a neat tibble.
ouwie_tidy( phy, disc_trait, cont_traits, models, nsim, tip_col = NULL, dir = NULL, ... )
phy | 
 Phylogenetic tree(s) containing all species/specimens present in dataset.  | 
disc_trait | 
 Named vector of discrete characters where the names match the tree tips  | 
cont_traits | 
 Data frame containing a character column with tree tips and any number of columns containing continuous trait data. Order of columns does not matter.  | 
models | 
 Vector containing the set of models to run on each tree as designated in OUwie documentation  | 
nsim | 
 Number of simmaps to create and run all analyses on  | 
tip_col | 
 Optional; column name in "cont_traits" that matches tree tips  | 
dir | 
 Optional; the directory to save output to, otherwise will save to working directory  | 
params | 
 Optional; list of parameters to be passed to OUwie. NOTE: be aware that default OUwie parameters differ from the default OUwie documentation.  | 
Function returns a list of the following
input | 
 Simmaps and traits originally input into OUwie  | 
full_output | 
 Raw tibble with all results  | 
tidy_output | 
 Tidy tibble summarizing results  | 
Beaulieu, J. M., & O’Meara, B. 2014. OUwie: analysis of evolutionary rates in an OU framework.
#simulating dummy data to run through OUwie
phy <- pbtree(n = 20, nsim = 2)
disc_trait <- setNames(sample(letters[1:2], 20, replace = TRUE), phy[[1]]$tip.label)
cont_traits <- as_tibble(iris[1:20, 1:2]) %>%
 mutate(species = phy[[1]]$tip.label)
models <- c("BM1", "OUM") #set of models to run on each simmap
results <- ouwie_tidy(phy, disc_trait, cont_traits, models, nsim = 2)
results$tidy_output
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.