The formal list for subset.data.frame accepts a "..."

> args(subset.data.frame)
function (x, subset, select, drop = FALSE, ...)
NULL

But it appears that subset.data.frame does not actually use the "..." or
pass it along:

> "..." %in% all.names(body(subset.data.frame))
[1] FALSE

Is there any reason why subset.data.frame needs to accept extra, unused
arguments? One recurring error I see myself and other people making in
interactive use is to type an = instead of an == in a subset call, e.g.

subset(df, column=value)

which I think ought to be an error, but it silently returns df instead.

If "..." were eliminated from the formals of subset.data.frame, it would
eliminate a frequent user error.

Peter

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to