Learn R Programming

StormR (version 0.2.1)

getInObs: Getting the number of the observations

Description

The getInObs() function returns the number of the observations in a given storm or stormsList object.

Usage

getInObs(s, ...)

# S4 method for stormsList getInObs(s, name, season = NULL)

# S4 method for storm getInObs(s)

Value

Numeric vector.

Arguments

s

storm or stormsList object.

...

extra argument for stormsList

name

character. Name of the storm in capital letters.

season

numeric. Cyclonic season of the storm. Required only if several storm in s object have the same name. Default value is set to NULL

Examples

Run this code
#Creating a stormsDataset
# \donttest{
sds <- defStormsDataset()

#Getting storm track data for all storms near New Caledonia
sts <- defStormsList(sds=sds, loi = "New Caledonia")

#Getting the number of the observation for the tropical cyclone Niran in the sts object
getInObs(getStorm(sts, name = "NIRAN"))
getInObs(sts, name = "NIRAN")
# }

Run the code above in your browser using DataLab