Skip to content
Back to formatted view

Raw Message

Message-ID: <x24s1bcsrz.fsf@blueberry.kubism.ku.dk>
Date: 2000-11-14T00:16:16Z
From: Peter Dalgaard
Subject: R help for a newby
In-Reply-To: ben@zoo.ufl.edu's message of "Mon, 13 Nov 2000 17:35:29 -0500 (EST)"

ben at zoo.ufl.edu writes:

>   I don't actually think there's an easy way to do this; an alternate way
> might be to reformat your data either with fixed-width fields (read.fwf())
> or with separator characters.  

..or add NA values to fill the rows with missing observations.

> If you insist, though, here is a (probably
> overly convoluted) way of doing what I think you want.  I would welcome
> suggestions for making this more efficient or understandable.

In the development version, scan and read.table now have a fill= argument...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._