OT: log(0) - NaN, NA, ‘.’, –∞, or empty [General Statistics]
Dear Detlew,
Phoenix:
No warnings whatsoever.
Cough, if one doesn’t know the answer, improvise! I have some sympathies for R’s approach, since $$\small{\lim_{x \to 0}\log_{e}x=-\infty}$$
R is strong in presenting the limit of a function even if it is undefined for the value in a strict sense:
Whether this does make sense in the real world, is another story.
Phoenix:
x = 0
Data Transformation > Functions > LN(x)
Result: empty
No warnings whatsoever.

❝ R:
❝ >log(0)
❝ [1] -Inf
Cough, if one doesn’t know the answer, improvise! I have some sympathies for R’s approach, since $$\small{\lim_{x \to 0}\log_{e}x=-\infty}$$

R is strong in presenting the limit of a function even if it is undefined for the value in a strict sense:
x <- c(0, 1, 2)
y <- 1 / x
y
# [1] Inf 1.0 0.5
z <- 1 / y
z
# [1] 0 1 2
res <- data.frame(x = x, y = y, z = z)
names(re)[2:3] <-c("y=1/x", "z=1/y")
print(res, row.names = FALSE)
x y z
0 Inf 0
1 1.0 1
2 0.5 2
isTRUE(all.equal(res$x, res$z))
# [1] TRUE
Reach for the stars,
even if you have to stand on a cactus. Susan Longacre
Whether this does make sense in the real world, is another story.
x <- c(rep(10, 23), 0)
y <- mean(log(x))
geo_mean <- exp(y)
geo_mean
# [1] 0
—
Dif-tor heh smusma 🖖🏼 Довге життя Україна!![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- Log-transformation of "null" PK parameters fno 2014-03-11 12:18 [General Statistics]
- Non-informative “profiles” Helmut 2014-03-11 13:29
- Non-informative “profiles” Ohlbe 2014-03-11 13:47
- Non-informative “profiles” Helmut 2014-03-11 14:04
- Non-informative “profiles” fno 2014-03-11 15:52
- Non-informative “profiles” Helmut 2014-03-11 17:22
- Non-informative “profiles” ElMaestro 2014-03-11 18:50
- OT: log(0) - NaN, NA or what d_labes 2014-03-12 08:59
- OT: log(0) - NaN, NA, ‘.’, –∞, or emptyHelmut 2014-03-12 15:31
- Non-informative “profiles” fno 2014-03-12 11:18
- Non-informative “profiles” nobody 2014-03-12 13:18
- OT: log(0) - NaN, NA or what d_labes 2014-03-12 08:59
- Non-informative “profiles” ElMaestro 2014-03-11 18:50
- Non-informative “profiles” Helmut 2014-03-11 17:22
- Non-informative “profiles” fno 2014-03-11 15:52
- Non-informative “profiles” Helmut 2014-03-11 14:04
- Non-informative “profiles” Ohlbe 2014-03-11 13:47
- Non-informative “profiles” Helmut 2014-03-11 13:29