Re: [R] Importing data from a text file with no separator

2016-06-09 Thread Duncan Murdoch
ginal Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Paolo Letizia Sent: Wednesday, June 08, 2016 8:40 PM To: r-help@r-project.org Subject: [R] Importing data from a text file with no separator I have row data in a text file, where each row consists of 22 numerical chara

Re: [R] Importing data from a text file with no separator

2016-06-09 Thread Federman, Douglas
?read.fwf There is a data import/export document on cran.r-project.org -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Paolo Letizia Sent: Wednesday, June 08, 2016 8:40 PM To: r-help@r-project.org Subject: [R] Importing data from a text file with no

Re: [R] Importing data from a text file with no separator

2016-06-08 Thread Adrian Dușa
See: ?read.fwf Example: > ff <- tempfile() > cat(file = ff, "10030614911608", "10030614911608", sep = "\n") > read.fwf(ff, widths = c(2,8,10), colClasses = "character") V1 V2 V3 1 10 03061490 000116 2 10 03061490 000116 > unlink(ff) Hth, Adrian On Thu,

[R] Importing data from a text file with no separator

2016-06-08 Thread Paolo Letizia
I have row data in a text file, where each row consists of 22 numerical characters. Each row consists of three different column but there is no separator. Specifically, the first two characters of the raw represent the first column of data, the subsequent 8 characters represent the second column o