Re: [R] "NaN" answer don't understand why

2020-11-14 Thread varin sacha via R-help
Dear Bill, Many thanks for your response. I got it. Best, Le samedi 14 novembre 2020 à 00:17:10 UTC+1, Bill Dunlap a écrit : fit <- robustgam::robustgam(...) produces a list, with no class attached, so residuals(fit) invokes the default method for residuals(), which essentially r

Re: [R] "NaN" answer don't understand why

2020-11-13 Thread Bill Dunlap
fit <- robustgam::robustgam(...) produces a list, with no class attached, so residuals(fit) invokes the default method for residuals(), which essentially returns the 'residuals' component of 'fit'. There is no such component so it returns NULL, an object of length zero. The mean of a length-zero

[R] "NaN" answer don't understand why

2020-11-13 Thread varin sacha via R-help
Dear R-experts, Here below my reproducible example. No error message but I can not get a result. I get "NaN" as a result. I don't understand what is going on. Many thanks for your precious help, as usual.  # # # # # # # # # # # # # # # # # # # # # # # # # x<-c(499,491,500,517,438,495,501,525,5