## Load the disparity data based on Beck & Lee 2014
data(disparity)
## How many subsets are in disparity?
n.subsets(disparity)
## What are the subset names
name.subsets(disparity)
## What are the number of elements per subsets?
size.subsets(disparity)
## Get one subset
get.subsets(disparity, "60")
## Get two subsets
get.subsets(disparity, c(1,5))
## Generate subsets from a dummy matrix
dummy_matrix <- matrix(rnorm(120), 40, dimnames = list(c(1:40)))
dummy_subsets <- custom.subsets(dummy_matrix,
group = list("a" = c(1:5), "b" = c(6:10), "c" = c(11:20),
"d" = c(21:24), "e" = c(25:30), "f" = c(31:40)))
## Merging the two first subsets
combine.subsets(dummy_subsets, c(1,2))
## Merging the three subsets by name
combine.subsets(dummy_subsets, c("d", "c", "e"))
## Merging the subsets to contain at least 20 taxa
combine.subsets(dummy_subsets, 10)
Run the code above in your browser using DataLab