new_df {cheapr} | R Documentation |
Cheap data frame utilities
Description
Cheap data frame utilities
Usage
new_df(..., .nrows = NULL, .recycle = TRUE, .name_repair = TRUE, .args = NULL)
as_df(x)
fast_df(..., .args = NULL)
df_modify(x, cols)
list_as_df(x)
name_repair(x, dup_sep = "_", empty_sep = "col_")
unique_name_repair(x, dup_sep = "_", empty_sep = "col_")
col_c(..., .recycle = TRUE, .name_repair = TRUE, .args = NULL)
row_c(..., .args = NULL)
Arguments
... |
Key-value pairs. |
.nrows |
|
.recycle |
|
.name_repair |
|
.args |
An alternative to |
x |
An object to coerce to a |
cols |
A list of values to add or modify data frame |
dup_sep |
|
empty_sep |
|
Details
fast_df()
is a very fast bare-bones version of new_df()
that
performs no checks and no recycling or name tidying, making it appropriate
for very tight loops.
Value
A data.frame
.
name_repair
takes a character vector and returns unique strings by
appending duplicate string locations to the duplicates.
This is mostly used to create unique col names.