Thomas Lumley <[EMAIL PROTECTED]> writes: > On Thu, 7 Aug 2003, Gabor Grothendieck wrote: > > > > > Could someone explain the thinking behind the backtick notation in > > r-devel? > > > > I think I understand that it can be used to refer to variable names > > which would otherwise not conform to R syntax; however, assign and > > as.name already allow you to do this. Is there more to it than that? > > assign and as.name are fairly limited. For example, if you have a list or > data frame whose name is syntactically invalid it is quite difficult to > access or modify its columns.
Yes. `weight in kg`[101]<-55 is pretty difficult to do with get() and assign() and lm(`weight in kg`~I(`height in m`^2)) is tricky too. The use is sort of similar to the single quotes in shell programming (but not quite). The choice of the backtick as quoting delimiter was mostly because that was the only one available.... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel