Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Fixed Width Data

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))



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.