Learn R Programming

spphpr (version 1.0.0)

toDOY: Function for Transferring a Date to the Value of Day-of-Year

Description

Transfers the date (from year, month and day) to the value of day-of-year.

Usage

toDOY(Year, Month, Day)

Value

The returned value is a vector of transferred dates in day-of-year.

Arguments

Year

the vector of years

Month

the vector of months

Day

the vector of days

Author

Peijian Shi pjshi@njfu.edu.cn, Zhenghong Chen chenzh64@126.com, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.

Details

The user needs to provide the three separate vectors of Year, Month and Day, rather than providing a single date vector. The arguments can be numerical vectors or character vectors.

References

Shi, P., Chen, Z., Reddy, G.V.P., Hui, C., Huang, J., Xiao, M. (2017a) Timing of cherry tree blooming: Contrasting effects of rising winter low temperatures and early spring temperatures. Agricultural and Forest Meteorology 240\(-\)241, 78\(-\)89. tools:::Rd_expr_doi("10.1016/j.agrformet.2017.04.001")

Shi, P., Fan, M., Reddy, G.V.P. (2017b) Comparison of thermal performance equations in describing temperature-dependent developmental rates of insects: (III) Phenological applications. Annals of the Entomological Society of America 110, 558\(-\)564. tools:::Rd_expr_doi("10.1093/aesa/sax063")

See Also

BJDAT

Examples

Run this code

data(BJDAT)
X2   <- BJDAT
DOY2 <- toDOY(X2$Year, X2$Month, X2$Day)
# cbind(X2$DOY, DOY2)

Run the code above in your browser using DataLab