This R
code:
Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
Sp = rep(c("s","c","v"), rep(50,3)))
train <- sample(1:150, 75)
z <- MASS::lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)
MASS::predict.lda(z)
gives the following error message:
Error: 'predict.lda' is not an exported object from 'namespace:MASS'
The predict.lda
function of MASS
is documented but, apparently, not part of the package's namespace. Why not?
This problem is important because I need to use predict.lda
in a package of my own and this error is making it fail the CRAN checks.
We can load the package and then use
predict
Or specify the
:::
. According to?":::"
Or another option is to get the function from name space