[R] Scan and Lists

Michael Lefsky lefsky at gmail.com
Wed Sep 14 23:06:17 CEST 2005

This may be a newbie question - although I did search for this error
message in the archives and via google and didn't see this error:

The help page for "scan" indicates that among the types of data
capable of being read are:

> "The supported types are 'logical', 'integer', 'numeric', 'complex', 'character', 'raw' and 'list': 
> 'list' values should have elements which are one of the first six types listed or 'NULL'.

I have tried to use a list within a "what" list : 

f <- scan(file="c:/test/testout.csv",what=list(hi=0.0,bye="",wave=list(1:1000)),sep=",",skip=1)

and the following error is returned: 

 "c:/test/testout.csv", what = list(hi = 0, bye = "",  : 
        unimplemented type 'list' in 'extractItem'

So, is my syntax confusing R, or is the documentation wrong, or is it
some other, third, option?


Michael Lefsky
College of Natural Resources
Colorado State University
Out of the crooked timber of humanity, 
no straight thing was ever made- Immanuel Kant

More information about the R-help mailing list