Why different output from math expression nest in function vs. called directly?
Struct a weird effect in R. When coding a math expression as a function you get a different output than when coded directly? Any good explanations/solutions?
myfun <- function(x) x^(1/4)
myfun(-238194.65) returns: NaN
-238194.65^(1/4) returns: -22.0919
from Recent Questions - Stack Overflow https://ift.tt/3crKQQP
https://ift.tt/eA8V8J
Comments
Post a Comment