Skip to content
Prev 366392 / 398502 Next

Lubdridate: subset based on hour and minute

Hi Joe:

See below.
test[test at hour > 9]
[1] "10H 0M 0S"  "10H 30M 0S" "11H 0M 0S" 


You are using a logical "and" in your test - so the condition "test at minute > 0" isn't met for 11:00 and therefore it doesn't show up. as both conditions must be met  You could also do:
[1] "10H 0M 0S"  "10H 30M 0S" "11H 0M 0S" 

-HTH,

Roy
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.