# How to do it in R

4 messages
Open this post in threaded view
|

## How to do it in R

 Dear all, I`ve got to calculate the ratio of methanogens to bacteria, but I wouldn`t like to divide the total copy numbers of methanogens ( on average 10^8) by bacteria (10^10) because they have different exponents and bases. So, my idea is to standardize both microorganisms counts to 10^3. Hypothetical example of what I`d like to do: Total Methanogens: 28 x 10^3 Total bacteria: 710 x 10^3 Total: 710 + 28= 738 x 10^3 Met/bac Ratio : (28/738)*100 = 3.79% How could I perform this calculation in R? Thanks, -- Andre         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: How to do it in R

 myfun <- function(a, b) a/(a + b) Leonardo Ferreira Fontenelle Em Sex 24 jun. 2016, às 13:05, André Luis Neves escreveu: > Dear all, > > I`ve got to calculate the ratio of methanogens to bacteria, but I > wouldn`t > like to divide the total copy numbers of methanogens ( on average 10^8) > by > bacteria (10^10) because they have different exponents and bases. So, my > idea is to standardize both microorganisms counts to 10^3. > > Hypothetical example of what I`d like to do: > > Total Methanogens: 28 x 10^3 > Total bacteria: 710 x 10^3 > > > Total: 710 + 28= 738 x 10^3 > > Met/bac Ratio : (28/738)*100 = 3.79% > > How could I perform this calculation in R? > > Thanks, > > -- > Andre > > [[alternative HTML version deleted]] > > ______________________________________________ > [hidden email] mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.