[R] strangeness in Predict() {rms}
Dylan Beaudette
debeaudette at ucdavis.edu
Wed Feb 17 01:05:18 CET 2010
Hi,
Running the following example from ?Predict() throws an error I have never
seen before:
set.seed(1)
x1 <- runif(300)
x2 <- runif(300)
ddist <- datadist(x1,x2); options(datadist='ddist')
y <- exp(x1+ x2 - 1 + rnorm(300))
f <- ols(log(y) ~ pol(x1,2) + x2)
p1 <- Predict(f, x1=., conf.type='mean')
Error in paste(nmc[i], "=", if (is.numeric(x)) format(x) else x, sep = "") :
cannot coerce type 'closure' to vector of type 'character'
In addition: Warning message:
In is.na(v) : is.na() applied to non-(list or vector) of type 'closure'
Here is the output from sessionInfo()
R version 2.9.0 (2009-04-17)
i686-pc-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] grid splines stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] plyr_0.1.9 mgcv_1.5-5 RColorBrewer_1.0-2 nlme_3.1-94
[5] rms_2.1-0 Hmisc_3.7-0 survival_2.35-6 lattice_0.17-25
loaded via a namespace (and not attached):
[1] cluster_1.12.0
Any ideas?
Thanks!
Dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
More information about the R-help
mailing list