I have 20 data frames. Each has 3 columns. I need to calculate the mean (per dataset) of the column named as 'value' and the sum of the numbers in the same column and them combine all of the results into one dataset. The new dataset will then have 20 rows and three columns c('file', 'mean_value', 'sum_value'). The rows are going to be the names of the file I loaded in R and the corresponding columns items will be the mean and the sum.
For example: data1 = data.frame(name = c('Mary', 'John'), location = c('north', 'south'), values = c(2,4)
data2 = data.frame(name = c('Joseph', 'Claire'), location = c('north', 'west'), values = c(20,40)
data3 = data.frame(name = c('Dan', 'Louis'), location = c('east', 'south'), values = c(12,4)
... until data20
result = data.frame(file=c('data1', 'data2', 'data3), mean_value = c(3, 30, 8), sum_value = c(6,60,16)
Thank you very much!