I take this case as cut a data set by breaks and assign each segment a label
name.

a <- data.frame(timestamp=c(3,5,8), mylabel=c("abc","def","ghi"))
b <- data.frame(timestamp=c(1:10))
bks <- c(a$timestamp,max(b$timestamp))
lbs <- a$mylabel
b$label <- cut(b$timestamp, breaks=bks, labels=lbs, include.lowest = T,
right=T)

-----
A R learner.
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Merging-columns-along-time-line-tp2289147p2289395.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.

Reply via email to