|
DATA MINING
Desktop Survival Guide by Graham Williams |
|
|||
Suppose we have a fixed-width data file with fields of 10 and 5
characters each.
> lines <- readLines("mydata.dat")
> dframe <- data.frame(salary = as.numeric(substr(lines, 1, 10),
age = as.numeric(substr(lines, 11, 15))
|