Learn R Programming

oce (version 0.9-20)

subset,amsr-method: Subset an amsr Object

Description

This function is somewhat analogous to subset.data.frame, but only one independent variable may be used in subset in any call to the function, which means that repeated calls will be necessary to subset based on more than one independent variable (e.g. latitude and longitude).

Usage

"subset"(x, subset, ...)

Arguments

x
A amsr object, i.e. one inheriting from amsr-class.
subset
An expression indicating how to subset x.
...
Ignored.

Value

An amsr object.

See Also

Other things related to amsr data: [[<-,amsr-method, amsr-class, composite,amsr-method, download.amsr, plot,amsr-method, read.amsr, summary,amsr-method

Examples

Run this code
## Not run: 
# library(oce)
# earth <- read.amsr("f34_20160102v7.2.gz") # not provided with oce
# fclat <- subset(earth , 45<=latitude & latitude <= 49)
# fc <- subset(fclat , longitude <= -47 & longitude <= -43)
# plot(fc)
# ## End(Not run)

Run the code above in your browser using DataLab