[R] Error: NA/NaN/Inf in foreign function call (arg 1)
Sébastien Plante
splante at globetrotter.net
Fri Jun 14 17:20:08 CEST 2002
Hi,
I have a huge data table with several variables containing missing values. I
want to make a simple scatter plot (Mass, HSI) and draw a smooth regression
on it.
Here are the summaries of these two variables:
> summary(Mass)
Min. 1st Qu. Median Mean 3rd Qu. Max.
46.0 205.9 272.5 282.6 348.3 610.1
> summary(HSI)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.300 1.045 1.350 1.491 1.835 4.270 13.000
So there are 13 missing values in HSI.
I did
plot(Mass,HSI)
and it worked fine. However, when I wanted to draw the smooth regression,
scatter.smooth(Mass,HSI)
I got this error:
Error: NA/NaN/Inf in foreign function call (arg 1)
I did not forgot to load the package modreg...
Must I declare the "NAs" before doing this analysis? If so, how?
Thanks,
Sébastien Plante
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list