I did not see a reply to your question. I don't know if you can do it within scan but why not just read in the file and then drop the 21?
dat <- scan("stop.txt", sep = "\t") dat1 <- dat[dat!= 21] John Kane Kingston ON Canada > -----Original Message----- > From: jamilnase...@gmail.com > Sent: Wed, 3 Apr 2013 10:33:16 +0100 > To: r-help@r-project.org > 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. ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails ______________________________________________ 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.