[Rd] Dots are not fixed by make.names()

Kirill Müller krlmlr+ml @ending from m@ilbox@org
Fri Oct 5 11:27:54 CEST 2018


Hi


It seems that names of the form "..#" and "..." are not fixed by 
make.names(), even though they are reserved words. The documentation reads:

 > [...] Names such as ".2way" are not valid, and neither are the 
reserved words.

 > Reserved words in R: [...] ... and ..1, ..2 etc, which are used to 
refer to arguments passed down from a calling function, see ?... .

I have pasted a reproducible example below.

I'd like to suggest to convert these to "...#" and "....", respectively. 
Happy to contribute PR.


Best regards

Kirill


make.names(c("..1", "..13", "..."))
#> [1] "..1"  "..13" "..."
`..1` <- 1
`..13` <- 13
`...` <- "dots"

mget(c("..1", "..13", "..."))
#> $..1
#> [1] 1
#>
#> $..13
#> [1] 13
#>
#> $...
#> [1] "dots"
`..1`
#> Error in eval(expr, envir, enclos): the ... list does not contain any 
elements
`..13`
#> Error in eval(expr, envir, enclos): the ... list does not contain 13 
elements
`...`
#> Error in eval(expr, envir, enclos): '...' used in an incorrect context



More information about the R-devel mailing list