[R] R help for a newby

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Nov 14 01:16:16 CET 2000


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list