I am trying to make a few barplots in R. Here is what I have so far:
For this particular chart it is not important to me how many responses there are per browser, I simply want to know which percentage was a yes and which percentage was a no for each browser.
How can I transform the table that I am using to use 'percentage of column' instead of number of results? Is there a way to transform each column by the sum of that column? (I am very new to R) Thanks!
Edit: Sorry for lack of information. I have not installed any extra packages, just r-base on Ubuntu (installed this morning). Here is the output of dput:
structure(c(11L, 32L, 3L, 4L, 1L, 0L, 1L, 1L), .Dim = c(2L, 4L
), .Dimnames = structure(list(c("No", "Yes"), c("Chrome", "Firefox",
"Internet Explorer", "Safari")), .Names = c("", "")), class = "table")
Edit2: I found this function which seems to do what I want but am not really sure why it works.
prop.table(mymat, margin=2)*100