Learn R Programming

BIOdry (version 0.3)

moveYr: Seasonal years

Description

Level of years is processed for each of the years can begin in a month different than 'January'.

Usage

moveYr(cd, ini.mnt = "Oct")

Arguments

cd
data.frame object with factor-level columns of months and years, or numeric vector of repeated years with vector names being the months.
ini.mnt
character of initial month of the year (see details), or numeric value from 1 to 12. Default 'Oct' produces years to begin in October.

Value

object with the months being numeric values and the years beguinning in ini.mnt

Details

character months as defined in month.abb or month.name.

Examples

Run this code
## Climatic records of monthly precipitations and temperatures
data(PTclim05,envir = environment())

## Making year 1955 in plot 'P16106'to begin on 'April'
cl1 <- splitFrame(PTclim05,'year')[['P16106.1955']]
cl2 <- moveYr(cl1,ini.mnt = 4)
head(cl2)

## a simple vector of years
yr <- rep(2005,12)
names(yr) <- month.abb[1:12]
moveYr(yr)

Run the code above in your browser using DataLab