[R] Subset of a subset?
jck13
jennakeane at hotmail.com
Mon Nov 14 22:41:49 CET 2011
Hi All-
I have created a subset of my original csv for the times I am interested in
(9, 12, 3). I have a subset for all of those times then each individually. I
would like to have specific case studies to analyze individually for those
times. For example, I want to look at 2009/06/01-2009/06/10. Is the easiest
way to created a subset of ss? I haven't been able to figure out the easiest
way since I created by subsets based on the hour.
Thanks for any help!!
da=paste(Date)
tiso= strptime(da,format="%d/%m/%Y %H:%M")
tiso$h
df1= data.frame(tiso, mv)
## creating a subset of 9am, 12pm and 3pm.
ss= subset(mv, tiso$h==9| tiso$h ==12| tiso$h==15)
ss9= subset(mv, tiso$h==9)
ss12= subset(mv, tiso$h==12)
ss15= subset (mv, tiso$h==15)
##create a subset of each event
ss0609= subset( ss, tiso==2009-06-01 | tiso==2009-06-02)
Example of Data:
Date T002_03 T002_25 T004_03 T004_25 T006_03
31/03/2007 23:00 31 3 18 5 6 5.8 7 3.5
1/4/2007 0:00 30 2 16 5 7 2.5 8 4.7
1/4/2007 1:00 34 1 15 4 7 2.7 12 4.4
1/4/2007 2:00 34 0 11 6 6 2.5 16 4.4
1/4/2007 3:00 37 0 NoData 6 6 2.7 NoData
1/4/2007 4:00 34 1 13 4 5 1.4 12 4
1/4/2007 5:00 23 1 15 2 4 1.4 12 4.5
1/4/2007 6:00 13 1 16 3 3 2.2 14 4.1
1/4/2007 7:00 30 0 10 5 5 2.3 15 4.8
1/4/2007 8:00 36 0 18 4 13 5.3 22 2.7
1/4/2007 9:00 38 0 23 4 23 2.8 31 1.1
--
View this message in context: http://r.789695.n4.nabble.com/Subset-of-a-subset-tp4040973p4040973.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list