Felipe Carrillo wrote:
Hi:
Is there a function that counts the number of days of any given or current year based on the date?
See ?Date and ?strptime and try the following:
y <- as.numeric(format(as.Date("2008-11-25"), "%Y"))
as.numeric(format(as.Date(paste(y, "12", "31", sep="-")), "%j"))
HTH Thomas P.
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.