[R] Omitting a desired line from a table [Beginner Question]
pfc_ivan
pfc_ivan at hotmail.com
Sun Jan 25 23:06:33 CET 2009
I am a beginner using this R software and have a quick question.
I added a file into the R called fish.txt using this line.
fish<-read.table("fish.txt", head=T, fill=T)
The .txt file looks like this. Since it contains like 300000 lines of data I
will copy/paste first 5 lines.
Year GeoArea SmpNo Month
1970 1 13 7
1971 1 13 10
1972 1 13 8
1973 2 13 10
1974 1 13 11
Now what I want to do is to omit all the lines in the file that arent
happening in GeoArea 1, and that arent happening in Month 10. So basically
The only lines that I want to keep are the lines that have GeoArea=1 and
Month=10 at the same time. So if GeoArea=2 and Month=10 I dont need it. So i
just need the lines that have both of those values correct. How do I delete
the rest of the lines that I dont need?
Thank you everyone.
--
View this message in context: http://www.nabble.com/Omitting-a-desired-line-from-a-table--Beginner-Question--tp21657416p21657416.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list