Learn R Programming

phenModel (version 1.0)

get_cycle: Obtain Yearly Cycles

Description

Given a data.frame with columns representing days and months, returns a vector of indices representing which cycle each row corresponds to.

Usage

get_cycle(data, day, month, day.end, month.end)

Arguments

data

a data.frame

day

name of the column representing the days

month

name of the column representing the months

day.end

which day determines the end of a cycle?

month.end

which month determines the end of a cycle?

Value

A vector of integers.

Examples

Run this code
# NOT RUN {
data(valentia)

# cycle ends on 31st of October
valentia$cycle <- get_cycle(data = valentia, day = "day", month = "month",
                            day.end = 31, month.end = 10)
# }

Run the code above in your browser using DataLab