| seas.check {seas} | R Documentation |
Check the suitability of a data.frame, or seas.sum for seas
Description
Check the suitability of a data.frame or
seas.sum object for seas.
Usage
seas.df.check(x, orig, var)
seas.sum.check(x, orig, var, norm, year.filter, ann.only)
Arguments
x |
a data frame with temporal observations |
orig |
the original name of the data frame, for error messages |
var |
one or more variables in |
norm |
something to normalize |
year.filter |
a subset of |
ann.only |
|
Details
This utility function simply checks the suitability of a
data.frame or seas.sum objects for use with
seas.
If x is data.frame (using seas.df.check that is
really required, is a ‘date’ column, named x$date with a
class of either link{POSIXct} or link{Date}, and
one or more variables in the var columns of x.
There must be at least one finite observation in each of var,
if supplied.
These function is used within other functions, and is not intended to be called directly.
Value
seas.df.check returns a few helpful items from x in a
list using invisible:
id:station ID from one ofattr(x,"id")orx$id[1]name:name of seasonal data, such as a placeyear.range:integers of start, and ending yearscalendar:an attribute fromx$date; otherwise this will beNULLfor a normal proleptic Gregorian calendarmain:main title, from.seastitleunits:units forvar[1]long.name:long name forvar[1]ylab:y-axis label forvar[1]
seas.sum.check returns x with modifications, depending
on norm and year.filter.
Author(s)
Mike Toews
See Also
hidden functions for seas
Examples
data(mscdata)
dat <- mksub(mscdata, id=1108447)
str(seas.df.check(dat))
dat.ss <- seas.sum(dat)
str(seas.sum.check(dat.ss, norm="days"))