subset.pcaviz.Rd
Return subset of observations in pcaviz object.
# S3 method for pcaviz subset(x, subset, …)
x | An object of class |
---|---|
subset | Logical expression indicating elements or rows to keep; missing values are taken as false. |
… | Additional arguments to generic subset function. These additional arguments are not used here. |
A pcaviz object in containing data and PCA results for the selected elements only.
Note that unused levels are dropped from all factors (i.e., categorical variables).
link{pcaviz}
,
subset
,
droplevels
# Create the pcaviz object. data(iris) a <- pcaviz(prcomp(iris[1:4]),dat = iris) # Retain the subset of Iris samples in which the first PC is # positive. b <- subset(a,PC1 > 0)