Dots are not fixed by make.names()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Dots are not fixed by make.names()

Kirill Müller-2
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel