[R] Can a variable name include '_' or '.' in portable R code

Peng Yu pengyu.ut at gmail.com
Sun Aug 16 16:24:43 CEST 2009


It says in R-intro.pdf, "For portable R code (including that to be
used in R packages) only A–Za–z0–9 should be used." I'm an wondering
why '_' and '.' can be used in portable R code.

It very common that some variable name should be composed of two or
more English words. Can somebody let me know what is the widely
accepted practice to concatenate two English words into a variable
name? For example, shall I use "word1_word2" or "Word1Word2" or


More information about the R-help mailing list