I would like to add a new row at the bottom of my dataframe, which shows the average of value of each of the columns. For example
A B C D
1 2 3 4
2 3 4 5
3 4 5 6
4 5 6 7
The result I would like would be:
A B C D
1 2 3 4
2 3 NA 5
3 4 5 NA
4 5 6 NA
10/4 14/4 14/3 9/2
I have many columns with missing values (NA), also many columns have a different amount of entries, and I have 900 columns.
Is it possible to do this?
Many Thanks