I'm trying to rename a list object where the object name is being put together with either str_c() or paste(), but can't seem to get it to work. I'd assume this is possible, but I can't figure out how.
# some data
params <- tibble(col1=c(1,2,3), col2=c("a", "b", "c"))
# create empty list
all_output <- list()
# append new df to list
all_output <- append(all_output, list("this_works_fine" = params))
# append new df to list using the concatenated string
all_output <- append(all_output, list(str_c("this_", "does_", "not_", "work") = params))
Thanks for your help!