data(charadriiformes)
## Creating a dispRity object with a covar component
my_covar <-MCMCglmm.subsets(
data = charadriiformes$data,
posteriors = charadriiformes$posteriors,
tree = charadriiformes$tree,
group = MCMCglmm.levels(
charadriiformes$posteriors)[1:4],
rename.groups = c("gulls", "plovers", "sandpipers", "phylo"))
## Running a projection analyses between groups (on 100 random samples)
between_groups <- dispRity.covar.projections(my_covar, type = "groups", base = "phylo", n = 100)
## Summarising the results
summary(between_groups)
## Measuring the projection of the elements on their own average major axis
elements_proj <- dispRity.covar.projections(my_covar, type = "elements", sample = mean,
output = c("position", "distance"))
## Visualising the results
plot(elements_proj)
## Visualising the correlation
plot(elements_proj, speicfic.args = list(correlation.plot = c("position", "distance")))
Run the code above in your browser using DataLab