plsubset | R Documentation |
Select rows of data.frames keeping the variable attributes that drive pl graphics
plsubset(x, subset = NULL, omit = NULL, select = NULL, drop = FALSE,
keeprange = FALSE)
x |
data.frame from which the subset is to be generated |
subset, omit |
logical vector or vector of indices of rows or or
rownames of |
select |
vector of indices or names of variables to be selected |
drop |
logical: if only one variable remains, should the data.frame be converted into a vector? |
keeprange |
logical: should ranges
( |
plsubset
maintains the 'pl' attributes of the variables
of the data.frame (if there are), such as 'col', 'lty', ..., and
subsets the two attributes 'numvalues' and 'plcoord'.
This is useful if the way of displaying the axis is to be kept when a
new plot is drawn.
Data.frame with the selected rows (or without the omit
ted
rows, respectively) and all attributes as described above.
Werner A. Stahel
Argument subset
of the high level 'pl' functions
plyx, plmatrix
data(d.river)
dd <- d.river[seq(1,1000,4),]
dd$date <- gendateaxis("date",hour="hour", data=dd)
attr(dd$date, "ticksat")
dsubs <- plsubset(dd, subset=1:50)
attr(dsubs$date, "ticksat")
plyx(O2~date, data=dsubs)
## same as
## plyx(O2~date, data=dd, subset=1:50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.