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

Paolo Letizia paolo.letizia at gmail.com
Thu Jun 9 02:40:10 CEST 2016


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 of data and the last 12 characters represent the third column of
data. An example follows:

row data:
1003061490000000011608

The first two characters, "10", is the column "Regime"; the subsequent 8
characters, "03061490", is the column "Industry", and the last 12
characters, "000000011608", is the column dollar value. How do I import the
column data into R without having any separator in the text file?
Thanks for your help, Paolo.

	[[alternative HTML version deleted]]



More information about the R-help mailing list