I am currently experiencing issues with a loop construct of mine. I loop over several data frames that are stored in a list. For each iteration, I would like to extract the name of the data frame to be then used as output name. I tried the following:
df_list<-list(df1, df2, df3)
#Looping across list of data frames ...
#Extract name of data frame:
name<-paste0(as.character(df_list[[i]]), "result")
However, this approach extract the complete content of the data frame and uses it as variable name. I tried several other approaches, but all failed...
Thank you very much in advance!
names(df_list)return?names(df_list) <- c("df1", "df2", "df3")