vec<- scan("stop.txt")
#Read 635 items
vec1<-vec[vec!=21]
 length(vec1)
#[1] 584
any(vec1==21)
#[1] FALSE


A.K.

----- Original Message -----
From: Naser Jamil <jamilnase...@gmail.com>
To: R help <r-help@r-project.org>
Cc: 
Sent: Wednesday, April 3, 2013 5:33 AM
Subject: [R] scanning data in R

Dear R-user,
May I seek your suggestion.  I have a data file 'stop' to be scanned in R.
But I want to ignore one specific number '21' there. Putting differently, I
want to get all numbers in the file except 21. Is there any command to
achieve it?

--------------------------------------------------------------

b<-scan("F:\\stop.txt")

--------------------------------------------------------------

Many thanks for your kind attention.

Regards,
Jamil.

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


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

Reply via email to