Skip to content
Prev 77222 / 398502 Next

Scan and Lists

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

Thanks

M