Re: [R] Data Gaps

2010-10-15 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 14.10.2010 10:34:12: Thanks Dennis. One more thing if you don't mind. How to I abstract the individual H and T “arrays” from f(m,o,l) so as I can combine them with a date/time array and write to a file? Try to look at ?merge function

Re: [R] Data Gaps

2010-10-14 Thread dpender
Thanks Dennis. One more thing if you don't mind. How to I abstract the individual H and T “arrays” from f(m,o,l) so as I can combine them with a date/time array and write to a file? Sorry if it’s a simple question but I’m completely new to R. Cheers, Doug -- View this message

Re: [R] Data Gaps

2010-10-14 Thread Dennis Murphy
Hi: The essential problem is that after you append items, the result is a list with possibly unequal lengths. Trying to convert that into a data frame by the 'usual' methods (do.call(rbind, ...) or ldply() in plyr) didn't work (as anticipated). One approach is to initialize a maximum size matrix

[R] Data Gaps

2010-10-13 Thread dpender
R community, I am trying to write a code that fills in data gaps in a time series. I have no R or statistics background at all but the use of R is proving to be a large portion of my PhD research. So far my code identifies where and the number of new entries required but I do not know how to

Re: [R] Data Gaps

2010-10-13 Thread Dennis Murphy
Hi: Perhaps ?append for simple insertions... HTH, Dennis On Wed, Oct 13, 2010 at 1:24 AM, dpender d.pen...@civil.gla.ac.uk wrote: R community, I am trying to write a code that fills in data gaps in a time series. I have no R or statistics background at all but the use of R is proving

Re: [R] Data Gaps

2010-10-13 Thread dpender
Dennis, Thanks for that. The problem now is that I am trying to use it in a for loop. Based on the example before, 2 entries are required after H[3] as specified by O. The problem is that when inserting values the length of the array changes so I don't know how to tell the loop that. This is

Re: [R] Data Gaps

2010-10-13 Thread Dennis Murphy
Hi: On Wed, Oct 13, 2010 at 5:31 AM, dpender d.pen...@civil.gla.ac.uk wrote: Dennis, Thanks for that. The problem now is that I am trying to use it in a for loop. Based on the example before, 2 entries are required after H[3] as specified by O. The problem is that when inserting values