Skip to content

how to input incomplete data?

2 messages · Yong Wang, Uwe Ligges

#
Dear all
the question is:
the data is not same length for each variable(the column length 
unequal), how can R read this data? I tried 
read.table(filename,na.strings),not work.
thanks
best
yong
1 day later
#
Yong Wang wrote:

            
See ?read.table.

read.table() will work if there are seperators beween missing values 
(you have to specify 'sep' in that case!).
If the number of separators is unequal for some lines, the argument 
'fill' might help. If not, consider to use scan() or readLines() and 
postprocess the imported stuff.

Uwe Ligges