[R] scanning data in R

S Ellison S.Ellison at LGCGroup.com
Sun Apr 7 18:17:12 CEST 2013


>>   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?
>> 

See the na.strings argument to scan, and note that it can be a vector (eg c("NA","999")) 
 
This may be better than relying on exact matches to 21 after reading because of binary representation issues (faq 7.31 etc.)



*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list