[R] help
peter dalgaard
pdalgd at gmail.com
Wed Jan 11 10:06:21 CET 2012
On Jan 11, 2012, at 02:37 , R. Michael Weylandt wrote:
> That sort of name is allowed but not advised because it can lead to confusion in certain non-standard evaluation functions like subset().
Standard evaluation too:
data1$1G
attach(data1)
1G
Nowadays, backquoting (`1G`) solves the issue (in all cases?), but it wasn't always so.
> If you really want the name like that add the check.names = FALSE argument to read.table()
[snip]
>> data1 <- read.table(file = "filename.txt", header=FALSE, col.names =
>> c("class", "P", "1G"))
>>
>> but in the output I get an X infront of "1G", which disappears when I run
>> it with the name 'G' instead of '1G'. Am I not allowed to use numerical
>> values?
[snap]
--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list