clean | R Documentation |
Functions that will take a Dataset object, and remove samples and/or taxons with different criteria
clean(Dat, verbose = TRUE)
Dat |
A Dataset object |
verbose |
logical indicating whether to print info about the results. |
clean will remove any sample (column) or taxon (row) fromt your Dataset, that has no observations. Some functions like PCA and some linear models won't work if one of the rows or columns of the matrix are all zero, and so it is always a good idea to "clean" your dataset.
remove_samples and remove_taxons take respectively a list of samples or taxons to remove from the Dataset.
A Dataset object
Sur Herrera Paredes
remove_taxons, remove_samples
data(Rhizo) data(Rhizo.map) Dat <- create_dataset(Rhizo,Rhizo.map) Dat <- remove_samples(Dat,colnames(Dat$Tab)[1:50]) Dat <- remove_taxons(Dat,row.names(Dat$Tab)[1:115]) sum(colSums(Dat$Tab) == 0) sum(rowSums(Dat$Tab) == 0) Dat$Tab Dat.clean <- clean(Dat) Dat.clean$Tab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.