[R] Change Julian function in SPlus to R date code

roslinazairimah zakaria roslinaump at gmail.com
Wed Jun 10 09:46:46 CEST 2015


Dear r-users,

I have a code in SPlus which use julian function.  What is the similar code
used in R?

define.date1<-function(dt1,mt1,mt2,nn,da)
{ mt2<-mt2+1
start<-julian(mt1, 1, nn, origin=c(month=1, day=1, year=1971))+1
end<-julian(mt2, 1, nn, origin=c(month=1, day=1, year=1971))+da
a<-dt1[start:end,]
am<-as.matrix(a[,5])
}

I have check the Date package in R but not so sure how to adjust it.

Thank you for any help given.

	[[alternative HTML version deleted]]



More information about the R-help mailing list