Learn R Programming

provenance (version 4.4)

subset: Get a subset of provenance data

Description

Return a subset of provenance data according to some specified indices

Usage

# S3 method for distributional
subset(x, subset = NULL, select = NULL, ...)

# S3 method for compositional subset(x, subset = NULL, components = NULL, select = NULL, ...)

# S3 method for counts subset(x, subset = NULL, components = NULL, select = NULL, ...)

# S3 method for varietal subset(x, subset = NULL, components = NULL, select = NULL, ...)

Value

an object of the same class as x

Arguments

x

an object of class distributional, compositional, counts or varietal.

subset

logical expression indicating elements or rows to keep: missing values are taken as false.

select

a vector of sample names

...

optional arguments for the generic subset function

components

vector of categories (column names) to keep

See Also

amalgamate, combine

Examples

Run this code
data(Namib)
coast <- c("N1","N2","T8","T13","N12","N13")
ZTRcoast <- subset(Namib$HM,select=coast,components=c('gt','cpx','ep'))
DZcoast <- subset(Namib$DZ,select=coast)
summaryplot(ZTRcoast,KDEs(DZcoast),ncol=2)

Run the code above in your browser using DataLab