We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When kknn is referenced by namespace (as opposed to being fully attached via library) an error occurs:
kknn
library
train.con <- kknn::train.kknn( Sepal.Width ~ ., data = iris, kmax = 6, kernel = c("rectangular", "triangular", "epanechnikov", "gaussian", "rank", "optimal") ) #> Error in get(ctr, mode = "function", envir = parent.frame()): object 'contr.dummy' of mode 'function' was not found > sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.5.0 magrittr_1.5 Matrix_1.2-14 tools_3.5.0 igraph_1.2.2 yaml_2.2.0 grid_3.5.0 [8] pkgconfig_2.0.2 kknn_1.3.2 lattice_0.20-35
Created on 2018-10-02 by the reprex package (v0.2.1)
(the kknn version was installed from GH)
Perhaps defining the argument to be
contrasts = c(unordered = "kknn::contr.dummy", ordered = "kknn::contr.ordinal")
or use getFromNamespace or getAnywhere to reference it would work.
getFromNamespace
getAnywhere
We'd rather import the package when using it in another package to avoid name conflicts.
The text was updated successfully, but these errors were encountered:
I agree with this change. I'm using parsnip and kknn is failing because of
parsnip
Error in get(ctr, mode = "function", envir = parent.frame()) : object 'contr.dummy' of mode 'function' was not found
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When
kknn
is referenced by namespace (as opposed to being fully attached vialibrary
) an error occurs:Created on 2018-10-02 by the reprex package (v0.2.1)
(the
kknn
version was installed from GH)Perhaps defining the argument to be
or use
getFromNamespace
orgetAnywhere
to reference it would work.We'd rather import the package when using it in another package to avoid name conflicts.
The text was updated successfully, but these errors were encountered: