I want to import a table (.txt
file) in R with read.table()
. One column in my table is an ID with nine numerals - some ids begin with a 0, other wi
A reproducible example would be nice, but: use the colClasses
argument to read.table()
to specify that you want this column to be read as a character
variable, not numeric
. Or make them back into character
variables after reading them in, using sprintf
to pad the numbers with leading zeros. (The former is probably easier.)