[R] Line numbers of scan(0

David Winsemius dwinsemius at comcast.net
Fri Apr 29 06:28:49 CEST 2011

On Apr 28, 2011, at 11:07 PM, Lisa wrote:

> I am trying to write a function to check unusual values in my  
> datasets and
> correct them. As some R users suggested, I try to use readline() and  
> scan()
> in my function. Suppose there are several unusual values in a  
> dataset. I
> want to change the line numbers in scan() to something like: unusual  
> value
> 1, unusual value 2 and so on. I think this can make the correction  
> much
> easier.

Read the data in and process them. scan() is not the right tool for  
that. It is a low level function on which read.table and its kin are  

(Also ... do read the Posting Guide and learn to include context in  
your questions.)

David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list