[R] error "variable names are limited to 256 bytes" when sourcing code

Ben Bolker bolker at ufl.edu
Wed May 26 21:08:16 CEST 2010


Barry Rowlingson <b.rowlingson <at> lancaster.ac.uk> writes:
>  If a variable name can have 26 upper case + 26 lower case + 10
> numbers then the number of possible variable names is:
> 
> 711659926691456588820198688981513283237719214167524272940980007340737850\
> 071505550367426050190853744948955339987662427844810850852717191846883823768674\
> 280839119270574786535774460628640384757837267418932039347078114901615267344319\
> 690975277428929737916031623809028545597238524149983532303848529517503894555603\
> 085813572927495336324076794731576794044444062823255544802787912646756996122962\
> 654809395519130134923611540639384237080197541181260772381917961683956924416
> 
>  which should be enough for everyone (that's probably a lower bound
> since names can have dots and underscores etc in them).

  [completely off topic]

  You don't really need Maxima if you're willing to work on a log
scale ... the first character has to be alphabetic, so there are
only 52 choices.  I've included (26*2+10+2=64) possibilities for
the other 255 slots.

> log(52)+255*log(64)
[1] 1064.466
> .Last.value/log(10)
[1] 462.2919
> 10^462
[1] Inf

  I'm not quite sure how it works, but you can get even more if
you allow back-quotes:

> `#$!!`=4
> `#$!!`
[1] 4



More information about the R-help mailing list