I would like to calculate the median of my df database below.
In this case, I would like to get the median results for columns A1 through A10 and return the results for the columns separately.
Thanks!
#database
df <- structure(
list(D1 = c("a","a","b","b","b"),
D2 = c("c","d","c","d","c"), D3 = c("X","X","Y","Z","Z"), A1=c(1,2,3,4,5),A2=c(4,2,3,4,4), A3=c(1,2,3,4,6),
A4=c(1,9,4,4,6),A5=c(1,4,3,9,6),A6=c(1,2,4,4,8),A7=c(1,1,3,4,7),A8=c(1,6,4,4,2),A9=c(1,2,3,4,6),A10=c(1,5,3,2,7)),
class = "data.frame", row.names = c(NA, -5L))