Readers, Data was imported using the read csv command:
dataimport<-read.csv("/path/to/dataimport.csv") 10,2000 12,2001 13,2002 15,2003 17,2004 Using the help contents for 'predict.lm' (i.e. ?predict.lm) a new data frame was created dataimportextra<-data.frame(x=seq(1990,2010,1)) predict(lm(dataimport),dataimportextra[,2],se.fit=TRUE) write.csv<-(dataimportextraout,"/path/to/dataimportextra.csv") I was expecting to see in the file dataimportextra.csv something like: 1,1990 2,1991 3,1993 ... to previously known data 10,2000 ... final extrapolated value, e.g. 20,2010 I didn't ; this suggests that I chose the wrong function! Can someone please advise me of the correct function to use for this extrapolation task? yours, r251 mandriva2009 ______________________________________________ R-help@r-project.org 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.