[R] Reading a tab delimted file of varying length using read.table

Pradeep Bisht pradeep.bisht0303 at gmail.com
Sun Jan 17 16:31:08 CET 2016

Hello Experts  ,

Being a SAS developer I am finding it difficult to perform some of data
cleaning in R that are quite easy to perform in SAS .

I have been trying to read a .dat file and after a lot of attempts have
failed to find a solution . Maybe R doesn't have the functionality right
now or I am not looking in the right place . Here is my code .

colClasses = c("numeric", "character", "character","character", "double",
"character" ) )
The error i get i
this .
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
scan() expected 'a real', got '912-15yearsNoNo10.546No'

Also does read.table always calls scan in background to do its job . If so
why use read.table in first place .


	[[alternative HTML version deleted]]

More information about the R-help mailing list