On Jun 29, 2011, at 2:37 PM, Filipe Leme Botelho wrote:

Hi Tom,

At least to me it´s hard to picture what´s wrong without further details regarding your data. I use spline/linear interpolation of time series regularly, so maybe this example help you out.

ci_x
[1]   1   4  69 131 194 256 320 382
ci_y
[1] 0.1211 0.1213 0.1233 0.1241 0.1250 0.1254 0.1255 0.1255

approx(x=ci_x, y=ci_y, n=ci_x[length(ci_x)])$y


Regards,
Filipe.

-----Mensagem original-----
De: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] Em nome de tomtomme
Enviada em: quarta-feira, 29 de junho de 2011 12:28
Para: r-help@r-project.org
Assunto: [R] time series interpolation

Hi there,
I´ve got a datatable in R which I try to interpolate with this and get the
Error below:

new$temp<- approx(w03_11temp$temp, n = (nrow(w03_11temp)*5))$y

It looks to me that you are trying to assign a column vector into a dataframe but you are constructing it with five times as many elements as the dataframe has rows. I am unable to explain the error message, however. You say this is a 'datatable', so maybe the datatable maintainers would have a better idea, assuming you are using your terms correctly.



Error in new$temp <- approx(w03_11temp$temp, n = (nrow(w03_11temp) * 5))$y :
 Object of type 'closure' not registered

Any idea?? Thanks a lot.

--
View this message in context: 
http://r.789695.n4.nabble.com/time-series-interpolation-tp3633193p3633193.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

"This message and its attachments may contain confidential and/or privileged information. If you are not the addressee, please, advise the sender immediately by replying to the e-mail and delete this message."

"Este mensaje y sus anexos pueden contener información confidencial o privilegiada. Si ha recibido este e-mail por error por favor bórrelo y envíe un mensaje al remitente."

"Esta mensagem e seus anexos podem conter informação confidencial ou privilegiada. Caso não seja o destinatário, solicitamos a imediata notificação ao remetente e exclusão da mensagem."
______________________________________________
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.

David Winsemius, MD
West Hartford, CT

______________________________________________
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.

Reply via email to