rdply和.id参数 - NULL不能像描述的那样工作

bli*_*sse 7 r plyr

对于文档rdplyplyr包说,这对.id参数:

 .id: name of the index column. Pass ‘NULL’ to avoid creation of
      the index column. For compatibility, omit this argument or
      pass ‘NA’ to avoid converting the index column to a factor;
      in this case, ‘".n"’ is used as colum name..
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我传递NULL时,所描述的行为似乎不起作用.考虑:

>rdply(20, mean(runif(20)))
   .n           V1
1   1 0.4202275122
2   2 0.5140590765
3   3 0.4201277295
4   4 0.4082553896
...
Run Code Online (Sandbox Code Playgroud)

现在,我试图摆脱索引列:

> rdply(20, mean(runif(20)),.id=NULL)
Error in if (!is.na(.id)) names(labels) <- .id :
  argument is of length zero
In addition: Warning message:
In is.na(.id) : is.na() applied to non-(list or vector) of type 'NULL'
Run Code Online (Sandbox Code Playgroud)

问题:如何使用.id参数来避免创建索引列,如文档中所述?

Mar*_*rek 5

等到这将被修复或使用现有列的名称.id:

> rdply(20, mean(runif(20)), .id="V1")
       V1
1  0.4804
2  0.6339
3  0.5460
4  0.4473
5  0.4639
6  0.4759
Run Code Online (Sandbox Code Playgroud)