rbind_results {arcgisutils} | R Documentation |
Combine multiple data.frames
Description
A general function that takes a list of data.frame
s and returns a single
and combines them into a single object. It will use the fastest method
available. In order this is collapse::rowbind()
, data.table::rbindlist()
,
vctrs::list_unchop()
, then do.call(rbind.data.frame, x)
.
Usage
rbind_results(x, call = rlang::current_env(), .ptype = data.frame())
Arguments
x |
a list where each element is a |
call |
The execution environment of a currently running
function, e.g. You only need to supply Can also be For more information about error calls, see Including function calls in error messages. |
.ptype |
currently unused. Reserved for a future release. |
Details
If all items in the list are data.frame
s, then the result will be a data.frame
.
If all elements are an sf
object, then the result will be an sf
object.
If the items are mixed, the result will be a data.frame
.
If any items are NULL
, then an attribute null_elements
will be attached
to the result. The attribute is an integer vector of the indices that
were NULL
.
Value
see details.
Examples
x <- head(iris)
res <- rbind_results(list(x, NULL, x))
attr(res, "null_elements")