[R] reading in ASCII files
    Johann Petrak 
    johann at ai.univie.ac.at
       
    Mon Oct  1 09:50:49 CEST 2001
    
    
  
Mark Myatt wrote:
> Johann Petrak <johann at ai.univie.ac.at> writes:
> 
>>- factors/levels are created automatically: often, the possible
>>  labels are known in advance and could immediately be
>>  converted. This would save a lot of memory and time for
>>  bigger files, I assume.
>>
> 
> You can use levels() and factor() to do this.
> 
I know ... the point I wanted to make is that for 
very big files, this is an awful waste of memory
and time:
everything gets first stored as strings and only
after being read in gets converted to levels.
I am currently trying to understand the R source code
to do it another way: first convert a single
ASCII file to several binary coded column-files,
then read in those columns needed using readBin.
This should allow greates flexibility when
files are really big.
Cheers,
   Johann
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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