[R] Loading 'akward' data file

Iago Mosqueira imosqueira at suk.azti.es
Wed Jun 16 15:00:44 CEST 2004


Hello,

I need to load a somehow diffilcult data file. It has lines with
variable names followed by a variable number of rows and columns of
data, separated from the next variable sometimes by a blank line,
sometimes simply by the new variable name. For example:

var1
123.33
var2
938

var3
1,1,1,1,1,1
var4
1,2,3,4,5
1,2,3,4,5

What would be the best startegy for loading a file like this? I would
like to have it staored as a list with the variable names used to name
the slots. Any pointers?

Many thanks,


Iago


 
--
Iago Mosqueira

Unidad de Investigacin Marina
Marine Research Division

AZTI Fundazioa

Txatxarramendi Ugartea z/g
48395 Sukarrieta, Bizkaia
Spain

Tfno. +(34) 94 602 94 00
Fax   +(34) 94 602 94 01

email imosqueira at suk.azti.es




More information about the R-help mailing list