[R] Data separated by spaces, getting data into R using field lengths

Philipp Pagel p.pagel at wzw.tum.de
Tue Sep 8 14:49:23 CEST 2009


On Tue, Sep 08, 2009 at 03:21:53PM +0300, Lauri Nikkinen wrote:
> This data is from database and the maximum length of a field is
> defined. I mean that every column has a maximum length and I want to
> use this maximum length as a separator. So if one "cell" in that
> column is shorter than the maximum, "cell" should be padded with white
> spaces or something like that. This seems to be hard to explain.

OK - now I got it. RODBC has already been sugested. If for some reason
that is impossible you could try to dump the data using a proper
delimiter (e.g. tab). Without a real delimiter it is certainly hard to
parse the data - and it may even be impossible depending on what
characters are allowed in your free-text fields.

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/




More information about the R-help mailing list