On 27/10/2019 7:01 p.m., Martin Møller Skarbiniks Pedersen wrote:
Hi,
I am trying to convert a small python computation to R but my R version
gets the wrong result.
You are using log10() in R, when you should be using log().
The python code:
import math import log
x = log(2)
for i in rang
Hi,
I am trying to convert a small python computation to R but my R version
gets the wrong result.
The python code:
import math import log
x = log(2)
for i in range(3,7):
x = log(i)**x
print(x)
3.14157738716919
My R-version:
x <- log10(2)
for (i in 3:6) {
x <- log10(i)**x
}
print(x)
[1]
2 matches
Mail list logo