R/jul2date2.R

Defines functions jul2date2

Documented in jul2date2

# Converts Julian day of year (day of year, year)   
# into a date (day,month,year). If year is missing a non-leap year
# is assumed.
jul2date2 <- function(d,y) {
	if(missing(y)) y <- 2001
	
	res <- .C("Cjul2date2",doy=as.integer(d),year=as.integer(y),day=integer(1),month=integer(1))

	return(list(day=res$day,month=res$month,year=res$year))
}

Try the pheno package in your browser

Any scripts or data that you put into this service are public.

pheno documentation built on May 13, 2022, 1:05 a.m.