Rsubset | R Documentation |
Construct subset data.frame while preserving attributes
Rsubset(Data, StartT = 0, EndT = 0, Var = NULL, Test = TRUE)
Data |
The data.frame from which a subset is extracted. Must contain a POSIX-format Time variable. |
StartT |
HHMMSS-format starting time, or 0 to start at the first row. |
EndT |
HHMMSS-format ending time, or 0 to end at the last row |
Var |
A character vector of variables to include, or 'ALL' to include all columns in the data.frame. The default is 'ALL', and Var=NULL produces this result also. |
Test |
A logical vector used to include rows. The default is TRUE, which will include all rows. This is provided so that tests like (Data$TASX > 130) can restrict what is included in the subset data.frame |
The 'subset()' or '[]' methods remove global attributes from the resulting data.frame. This function preserves those attributes or, where necessary (e.g., Dimensions), changes them appropriately.
A subset data.frame that retains the attributes of the original data.frame.
William Cooper
DS <- Rsubset (RAFdata, 201100,201230)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.