[R] How to do it in R

jim holtman jholtman at gmail.com
Fri Jun 24 18:25:27 CEST 2016


pretty simple:

> t_m <- 28e3
> t_b <- 710e3
> ratio <- t_m / (t_m + t_b) * 100
> ratio
[1] 3.794038


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

On Fri, Jun 24, 2016 at 12:05 PM, André Luis Neves <andrluis at ualberta.ca>
wrote:

> 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]]
>
> ______________________________________________
> R-help at r-project.org 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list