Learn R Programming

hyd1d (version 0.4.6)

subset.WaterLevelDataFrame: Subsetting WaterLevelDataFrames

Description

Returns subsets of WaterLevelDataFrames which meet conditions.

Usage

# S3 method for WaterLevelDataFrame
subset(x, subset, select, drop = FALSE, ...)

Value

An object similar to x, containing just the selected rows and columns. All other slots of the WaterLevelDataFrame remain unchanged.

Arguments

x

object of class WaterLevelDataFrame.

subset

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

select

expression, indicating columns to select from a data frame.

drop

passed on to [ indexing operator.

...

further arguments to be passed to or from other methods.

See Also

Examples

Run this code
wldf <- WaterLevelDataFrame(river   = "Elbe",
                            time    = as.POSIXct("2016-12-21"),
                            station = seq(257, 262, 0.1))
wldf <- subset(wldf, station >= 258 & station <= 261)

Run the code above in your browser using DataLab