I'm trying to execute the same functions over a group of 6 dataframes
I tried two possibilities:
DATAFRAMES <- c("df_IEC", "df_IVA", "df_MDC", "df_MDE", "df_SALV", "df_VIES")
for (item in DATAFRAMES) {
# examine dataframe
glimpse(item)
dim(item)
str(item)
# some statistics
summary(item)
}
and this one:
DATAFRAMES <- as.list(c("df_IEC", "df_IVA", "df_MDC", "df_MDE", "df_SALV", "df_VIES"))
ANALISE_RESUMO <- function(x) {
glimpse(x)
dim(x)
str(x)
# some statistics
summary(x)
}
result <- sapply(DATAFRAMES, ANALISE_RESUMO)
print(result)
Both of them considered the elements in the list or vector as text and not as a group of dataframes.
How can I solve this?