period {TAF} | R Documentation |
Period
Description
Paste two years to form a period
string.
Usage
period(x, y = NULL)
Arguments
x |
the first year, vector of years, matrix, or data frame. |
y |
the last year, if |
Details
If x
is a vector or a data frame, then the lowest and highest years
are used, and y
is ignored.
If x
is a matrix or data frame, this function looks for years in the
first column. If the values of the first column do not look like years (four
digits), then it looks for years in the row names.
Value
A string of the form "1990-2000"
.
Note
This function can be useful when working with draft.data
.
See Also
paste
is the underlying function to paste strings.
draft.data
has an argument called period
.
TAF-package
gives an overview of the package.
Examples
period(1963, 1970)
period(c(1963, 1970))
period(1963:1970)
period(range(catage.taf$Year))
period(catage.taf$Year)
period(catage.taf)
period(catage.xtab)
period(catage.long)
[Package TAF version 4.2.0 Index]