I am a complete beginner in R and having some problems with building functions...
My data looks like this.
I would like to build a function so that I can convert all values in the table into % relative frequency per column.
For example, for first column, I would like divide all the values in that column by columnn sum (colSum) of that column.
Then, I would like to repeat that over all columns.
Is there any functions I can look into? I tried apply function, but I couldn't get it to work.
Thank you:)
