Description Usage Arguments Value Author(s) References Examples
Aligns curves by x,y coordinates so that species curves can be analyzed as a single high-dimensional trait.
1  | phylocurve.generalized(tree, X, Y)
 | 
tree | 
 An object of class phylo  | 
X | 
 A numeric vector of length M, used for each species  | 
Y | 
 An N x M marix where each row corresponds to a species and each column corresponds to index M_i of X  | 
aligned_data  | 
 x and y coordinates arranged in a single row vector for each species  | 
aligned_coordinates  | 
 x and y coordinates for each species (one data point per row)  | 
aligned_X | 
 Aligned X coordinates in N x M matrix  | 
aligned_Y | 
 Aligned Y coordinates in N x M matrix  | 
nr | 
 Number of aligned landmarks  | 
anc_X | 
 Vector of root X values (assuming Brownian motion)  | 
anc_Y | 
 Vector of root Y values (assuming Brownian motion)  | 
tree | 
 Phylogenetic tree supplied into the function  | 
Eric W. Goolsby
Goolsby, E.W. 2015. "Phylogenetic comparative methods for evaluating the evolutionary history of function-valued traits." Systematic Biology. In press.
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | # NOT RUN (takes several minutes)
# x_length <- 50
# nspecies <- 25
#sim_data <- sim.curves(nspecies = nspecies,x_length = x_length)
#
# Perform ancestral curve reconstruction without any assumptions about function shape
# P <- phylocurve.generalized(tree = sim_data$tree,X = sim_data$data$x[1:x_length],
# Y = t(matrix(sim_data$data$y,nrow = x_length,
# dimnames = list(1:x_length,sim_data$tree$tip.label))))
#
# Data might need trimming for values where there is no variation
# plot(P$anc_X,P$anc_Y)
#
# P.trimmed <- phylocurve.trim(phylocurve.generalized = P,min_X = 4,max_X = 8)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.