Skip to content
Prev 301918 / 398506 Next

Date period

Hello,

You can try the following:

x <- read.table(text="2000-01-05 00:00:00           1.0
2000-01-05 01:00:00           1.0
2000-01-05 05:00:00           3.6
2000-01-05 06:00:00           3.6
2000-01-05 07:00:00           2.2
2000-01-05 08:00:00           2.2
2000-01-05 09:00:00           2.2
2000-01-05 10:00:00           2.2
2000-01-05 11:00:00           2.2
2000-02-05 00:00:00           1.0
2000-02-05 01:00:00           1.0
2000-02-05 05:00:00           3.6
2000-02-05 06:00:00           3.6
2000-02-05 07:00:00           2.2
2000-02-05 08:00:00           2.2
2000-02-05 09:00:00           2.2
2000-02-05 10:00:00           2.2
2000-02-05 11:00:00           2.2")

colnames(x) <- c('Date','Time','Value')

y <- c('00:00:00','01:00:00','02:00:00','03:00:00','04:00:00','05:00:00')

idx <- is.element(x$Time, y)
x[idx,]

Hope this help.
Pascal


Le 01/08/2012 15:48, ??????????? ????????? a ?crit :