Hello,
This must be a bloody R-beginner question but I just can't find an answer in my beginner books:
I have a dataframe like this:

myframe <- data.frame (Timestamp=c("24.09.2012 09:00:00", "24.09.2012 10:00:00", "24.09.2012 11:00:00"), Event=c("0.1","0.5","1.2") ) myframe$Timestamp <- as.POSIXct(strptime(myframe$Timestamp, format="%d.%m.%Y %H:%M:%S"))
expand<-data.frame(Timestamp=seq(myframe[1,1], myframe[3,1], by="1 mins"))
head(expand)
new <- merge(expand, myframe, all=T)
head(new)

I do not only want to expand the Dates but also I want to fill in the "Events" (i.e. 0,1 untill the date were 0.5 starts).
How do I do this?
Thanks in advance!

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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