I have list of data frames and i want to export one bar chart per data frame... I am trying use lapply but it does not work... Does anyone know how to do this?
my_data <- lapply(X = seq(from = 1, to = length(in_files_path), by = 1), FUN = function(x){
data_tables <- read.table(file = in_files_path[[x]], header = TRUE)
})
lapply(X = seq(from = 1, to = length(in_files_path), by = 1), FUN = function(x){
setwd(dir = ou_graph_path)
png(filename = in_files_name[[x]],
units = "in",
width = 15,
height = 10,
res = 300)
ggplot(data = my_data[[x]], aes(x = my_data[[x]]$A, y = my_data[[x]]$B)) +
geom_bar()
dev.off()
})