[R] memory allocation error
Pierre Kleiber
pkleiber at honlab.nmfs.hawaii.edu
Thu Mar 22 19:32:11 CET 2001
A way to read particular columns (if you have unix-like tools):
> dat <- matrix(scan(pipe("awk '{print $2,$5,$7}' filename")),byrow=T,ncol=3)
That would get column 2, 5, and 7 of "filename" into a three column matrix.
(Not so sure it qualifies as an excuse not to learn how to use RODBC)
Cheers, Pierre
--
"M. Edward (Ed) Borasky" wrote:
>
> On 22 Mar 2001, Peter Dalgaard BSA wrote:
>
> > [Anyone for implementing a columns= option for scan() and read.xxx() ??]
>
> Nah ... that would give me an excuse not to learn how to use RODBC :-) I ended
> up going back to Access and dropping a bunch of columns from the query before
> I exported it to a CSV file. Another excuse not to learn RODBC :-).
> --
> znmeb at aracnet.com (M. Edward Borasky) http://www.aracnet.com/~znmeb
>
> Coming soon to a theatre near you -- the remake of "War With The Newts"!
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-----------------------------------------------------------------
Pierre Kleiber Email: pkleiber at honlab.nmfs.hawaii.edu
Fishery Biologist Tel: 808 983-5399/737-7544
NOAA FISHERIES - Honolulu Laboratory Fax: 808 983-2902
2570 Dole St., Honolulu, HI 96822-2396
-----------------------------------------------------------------
"God could have told Moses about galaxies and mitochondria and
all. But behold... It was good enough for government work."
-----------------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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