[R] How to modify the dot-dot-dot argument using level names instead of position

Sébastien Bihorel pomchip at free.fr
Wed Aug 31 15:41:52 CEST 2011


Hi,

I thought "..2 <- 1" was a correct way to modify the content of the
2nd level of dot-dot-dot because it did not return any error message.
However, this appears to have no effect whatsoever on the content of
dot-dot-dot. So, I guess I should modify my question to: is it
possible to modify the content of dot-dot-dot by any means?

Thank

On Wed, Aug 31, 2011 at 9:25 AM, Sébastien Bihorel <pomchip at free.fr> wrote:
> Dear R-users,
>
> In the R internals manual, it is said that one can extract the
> elements of the dot-dot-dot argument using the special symbols ..1 or
> ..2. It seems to work just fine but I was wondering if there is a way
> one can extract or modify the content of the dot-dot-dot argument
> using a level name instead of its position?
>
> For instance, assuming that list(...) returns:
> $a
>  [1] 1 2 3 4 5 6 7 8 9 10
>
> $b
> [1] "a" "b" "c" "d" "e" "f" "g" "h"
>
> is there a way to modify level b without knowing that it is the second level?
>
> Thank you
>
> Sebastien
>



More information about the R-help mailing list