I have a dataframe with 4 columns. Three are the concentrations of heavy metals in whales with two different feeding modes. Is it possible to have a grouped barchart with concentration (ug/g) on the y axis then three different groups for the element concentrations on the x axis with each one comparing 'filter' and 'raptorial' feeders.
I tried using
factors = c(Filter, Raptorial),
dataframe = bothfmnewdata,
errbar = FALSE,
ylim=c(0, 140)) '''
|Feeding mode| Hg | Se | Cu |
|------------|----|----|----|
|Filter |0.28|0.47|0.89|
|Raptorial |0.67|1.09|0.08|
|Raptorial |2.45|5.90|2.22|
|Filter |4.20|0.01|3.45|
|Filter |0.20|3.45|1.34|
|Raptorial |4.55|6.13|3.33|
Output of dput():
dput(bardataframe) structure(list(fm = c("Raptorial", "Raptorial", "Raptorial", "Raptorial", "Filter", "Raptorial", "Raptorial", "Raptorial", "Filter", "Raptorial", "Raptorial", "Filter", "Filter", "Filter", "Filter", "Filter", "Raptorial", "Raptorial", "Filter", "Filter" ), hg = c(3.1738, 10.5, 18.31, 3.078, 0.09958, 1.67, 0.37, 4.1, 0.00135, 1.779, 0.05, 0.0065, 0.045, 0.029, 0.003, 0.012, NA, 1.29, 0.06, 0.058), cu = c(NA, NA, NA, NA, 0.23, NA, NA, NA, 2.635, NA, 8.1, NA, 3.03, 0.92, 0.6, 0.6, 0.24, NA, 0.285, 5.47 ), se = c(NA, NA, NA, NA, 0.76, NA, NA, 0.697, NA, NA, 0.35, 0.255, 1.13, 0.016, 0.105, 0.149, NA, NA, 0.132, NA)), row.names = c(43L, 45L, 46L, 50L, 64L, 70L, 72L, 73L, 74L, 75L, 90L, 97L, 98L, 99L, 100L, 101L, 106L, 122L, 151L, 152L), class = "data.frame")