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
?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
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,
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
4 matches
Mail list logo