[Rd] A trap for young players with the lapply() function.

2017-03-26 Thread Rolf Turner
From time to time I get myself into a state of bewilderment when using apply() by calling it with FUN equal to a function which has an "optional" argument named "X". E.g. xxx <- lapply(y,function(x,X){cos(x*X)},X=2*pi) which produces the error message Error in get(as.character(FUN), mo

[Rd] Documentation of model.frame() and get_all_vars()

2017-03-26 Thread Thomas J. Leeper
Hi everyone, This is about documentation for the model.frame() page. The get_all_vars() function (added in R 2.5.0) is a great addition, but the behavior of its '...' argument is different from that of model.frame() with which it is documented and this creates ambiguity. The current docs read: \i