An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20051006/428bd6fc/attachment.pl
Interpolation in time
3 messages · Anette Nørgaard, Achim Zeileis, Gabor Grothendieck
On Thu, 6 Oct 2005 16:10:15 +0200 Anette N??rgaard wrote:
This is exactly what I requested, thank you!! However I do actually have several columns in my data sheet where I need to do the same thing, then how do I come about that?
Look at na.approx() in package zoo. Best, Z
e.g. yr<-c(rep(2000,14)) doy<-c(16:29) dat1<-c(3.2,NA,NA,NA,NA,NA,NA,5.1,NA,NA,NA,NA,NA,4.6) dat2<-c(2.2,NA,NA,NA,NA,NA,NA,6.1,NA,NA,NA,NA,NA,4.2) dat3<-c(3.4,NA,NA,NA,NA,NA,NA,4.1,NA,NA,NA,NA,NA,4.7) ta<-cbind(yr,doy,dat1,dat2,dat3) [[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
na.approx(zoo(ta[,-seq(2)], tt)) where tt is as before.
On 10/6/05, Anette N??rgaard <anette at geoplus.dk> wrote:
This is exactly what I requested, thank you!! However I do actually have
several columns in my data sheet where I need to do the same thing, then
how do I come about that?
e.g.
yr<-c(rep(2000,14))
doy<-c(16:29)
dat1<-c(3.2,NA,NA,NA,NA,NA,NA,5.1,NA,NA,NA,NA,NA,4.6)
dat2<-c(2.2,NA,NA,NA,NA,NA,NA,6.1,NA,NA,NA,NA,NA,4.2)
dat3<-c(3.4,NA,NA,NA,NA,NA,NA,4.1,NA,NA,NA,NA,NA,4.7)
ta<-cbind(yr,doy,dat1,dat2,dat3)
[[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html