[R] Split fixed width data in R

Zilefac Elvis zilefacelvis at yahoo.com
Thu Oct 23 03:48:55 CEST 2014


Thanks John.
AT.


On Wednesday, October 22, 2014 5:23 PM, John McKown <john.archie.mckown at gmail.com> wrote:
 


On Wed, Oct 22, 2014 at 10:37 AM, Zilefac Elvis <zilefacelvis at yahoo.com>wrote:

Hi,
>I have fixed width data that I would like to split into columns. Here is a sanpshot of the data (actual data is a list object):
>​<snip>

>Thanks,
>AT.
>
>

​I see you already have an answer that you like. I will add that read.fwf might also be a possibility. It's difficult for me to tell if that last column is always 6 characters in length.

file <- textConnection(list_object)
read.fwf(file=file,c(4,2,2,4,6))

-- 
The temperature of the aqueous content of an unremittingly ogled
culinary vessel will not achieve 100 degrees on the Celsius scale.

Maranatha! <><
John McKown 
	[[alternative HTML version deleted]]



More information about the R-help mailing list