subset.DATRASraw {DATRAS} | R Documentation |
General method for subsetting a DATRASraw object.
## S3 method for class 'DATRASraw' subset(x, ..., na.rm = TRUE)
x |
Take subset of this dataset. |
... |
One or more subset criteria. |
na.rm |
Discard missing values in subset criterion? |
A DATRASraw object contains two kinds of information:
Between haul information (contained in component 2)
Within haul information (contained in component 1 and 3)
This method can subset over both
kinds of information - at once. The functionality is
achieved by matching each of the subset critera to the
appropriate data component. When a match is found the
subset is performed on the component and the subsetting
is continued to the next subset criteria. The number of
subset critera can be arbitrary and is given through the
...
argument.
The reduced dataset.
x <- readExchange(file1) y <- subset(x,Species=="Gadus morhua",LngtCm>30,HaulDur>25)