[R] Loop to find dates whithin dates

patraopedro patraopedro at yahoo.com.br
Mon Feb 7 18:36:14 CET 2011


Thank you for your responses but I think whith some examples the problem will
be better understated.
Ok, here it is an example of how the data looks like to allow a better
understanding of the problem.


Dframe1 <- data.frame(sunrise = seq(as.POSIXct("2010-07-14
06:05:25"),as.POSIXct("2010-07-20 06:05:25"),by="day"),sunset=
seq(as.POSIXct("2010-07-14 18:00:00"),as.POSIXct("2010-07-20
18:00:00"),by="day"))

Dframe2 <- data.frame(Logtime = seq(as.POSIXct("2010-07-14
06:05:25"),as.POSIXct("2010-07-20 06:05:25"),by="hour"),
temp = runif(145, -5, 15))

What I’m interested on is rows from the Dframe2 during the day, and for that
I need (I think) a loop to see if each Logtime occurred during the day or
night.


Cheers
Patrao   

-- 
View this message in context: http://r.789695.n4.nabble.com/Loop-to-find-dates-whithin-dates-tp3264180p3264540.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.

----------------------------------------------------------------------------
NOTICE: Please note that this eMail, and the contents thereof, 
is subject to the standard Sasol eMail legal notice which may be found at: 
http://www.sasol.com/legalnotices                                                                                                          

If you cannot access the legal notice through the URL attached and you wish 
to receive a copy thereof please send an eMail to 
legalnotice at sasol.com
----------------------------------------------------------------------------


More information about the R-help mailing list