Skip to content
Prev 9631 / 12125 Next

[R-pkg-devel] vapply and More Complex FUN.VALUE

On Tue, 26 Sep 2023 20:00:03 +0000
Dario Strbenac <dstr7320 at uni.sydney.edu.au> wrote:

            
Probably not with vapply(). It only looks at the equivalent of
typeof(), verifies the length() (which for data.frames is the number of
columns) and then combines the objects along the axis that you're not
interested in (building a list-matrix).

I've been using the do.call(rbind, lapply(...)) idiom, relying on
rbind.data.frame to check its arguments. It could probably be made more
efficient, but it does the job.