Hi, I recently started using RStudio and I continue my slow progression.
I mostly use it for quick data analysis and generation of plots from scientific results (biology).
I am currently working on the analysis of a set of data and I would like to represent my results as a side by side bars histogram.
I measured 2 samples from 6 proteins and I would like to measure the mean and insert it as a new row and later, look how to generate a side by side bars histogram.
I tried different approach but it is much more complicated that what I tough.
I used the colMean command, without considering the first column but after i do not know how to include my results into a new row.
My real data also include more than 20 columns, is there an efficient way to work a large amount of data and not a small set of data like my reprex.
Thank you in advance.
data.frame( stringsAsFactors = FALSE, ...1 = c("Val1", "Val2"), Prot1 = c(0.525, 0.534), Prot2 = c(0.469, 0.476), Prot3 = c(0.464, 0.457), Prot4 = c(0.525, 0.509), Prot5 = c(0.509, 0.511) ) #> ...1 Prot1 Prot2 Prot3 Prot4 Prot5 #> 1 Val1 0.525 0.469 0.464 0.525 0.509 #> 2 Val2 0.534 0.476 0.457 0.509 0.511