Re: [R] use of "@" character in variable name

From: John Fox <jfox_at_mcmaster.ca>
Date: Thu, 26 Mar 2009 21:53:08 -0400

Dear Mike,

As a slight simplification, a legal R name can start with a period (.), upper- or lower-case letter (A-Z, a-z), and can contain periods, underscores (_), letters, and numerals; depending upon the locale, some other characters may also be allowed. This information *is* in the R manuals, though it might not be that easy to locate: See section 10.3.2 of the R Language Definition manual or 1.8 of the Introduction to R manual.

@ is used to access slots in an S4 object.

I hope this helps,
 John

> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org]
On
> Behalf Of Mike Miller
> Sent: March-26-09 9:04 PM
> To: R-Help List
> Subject: [R] use of "@" character in variable name
>
> Importing data with a header row using read.delim, one variable should be
> named @5HTT but it is automatically renamed to X.5HTT, presumably because
> the "@" is either unacceptable or misunderstood. I've tried to find out
> what the rules are on variable names but have been unsuccessful. I'll bet
> someone here can tell me where to look. Maybe it's hidden away in here
> somewhere:
>
> http://cran.r-project.org/doc/manuals/R-data.pdf
>
> Thanks in advance.
>
> Mike
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 27 Mar 2009 - 00:56:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Mar 2009 - 02:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive