Skip to content

Commit 9df7804

Browse files
committed
add enlist from epiprocess
1 parent 2c5ca3d commit 9df7804

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

R/utils_enframer.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ enframer <- function(df, x, fill = NA) {
88
for (v in x) df <- dplyr::mutate(df, !!v := fill)
99
df
1010
}
11+
12+
enlist <- function (...) {
13+
# in epiprocess
14+
x = list(...)
15+
n = as.character(sys.call())[-1]
16+
if (!is.null(n0 <- names(x))) n[n0 != ""] = n0[n0 != ""]
17+
names(x) = n
18+
x
19+
}

0 commit comments

Comments
 (0)