[R] Limitations on R code file

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu May 6 00:12:25 CEST 2010


Hi James,

On Wed, May 5, 2010 at 5:28 PM,  <guox at ucalgary.ca> wrote:
> I would like to run R code from a file that is generated from other source.
> The file consists of some variables and formulas/equations such as
>
> Variables = log(100)
> ##Other variable definitions
> VariablesWithLongNames = 2*3*log(12345678)+10^4 + Variables
> Equations=log(VariablesWithLongNames)+Variables^2
> ##Other equations, formulas
> Result = Equations^2+rnorm(10000)
> hist(Result,breaks=100,freq=FALSE)
> lines(density(Result),col = "blue")
>
> The file may be very long and some variable names may be very long too.
> We know that objects > 100Mb can cause R to run out of memory.

Sorry, I don't follow.

I routinely work with objects in my workspace that are much larger
than 100MB, so I don't think I understand what you mean here.

Is R running out of memory, or is your computer running out of memory?
If it's the former, are you running 32bit or 64bit R?

> Not sure
> if there are any other limitations on variable length and source file length.
> So my question is
>
> what are the limitations of variable name length and the source file length
> in R?

R> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<- 10
Error: variable names are limited to 256 bytes

I don't have an answer about source file size, but I wouldn't imagine
there's a limit that any reasonably sized file would break.

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the R-help mailing list