0
votes

I try to install the kknn package in R. It downloads the folder but whenever I use library(kknn) I get:

Error in library(kknn) : there is no package called ‘kknn’


install.packages("kknn") Installing package into ‘C:/Users/Ed/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/kknn_1.3.0.zip' Content type 'application/zip' length 321517 bytes (313 KB) downloaded 313 KB

package ‘kknn’ successfully unpacked and MD5 sums checked Warning in install.packages : cannot remove prior installation of package ‘kknn’

The downloaded binary packages are in C:\Users\Ed\AppData\Local\Temp\RtmpWClNdR\downloaded_packages

library(kknn) Error in library(kknn) : there is no package called ‘kknn’

Any suggestions?

Many thanks

Ed

2
Did you mean 'knn' instead of 'kknn'? Also, if you did mean kknn can you show the installation output?cdeterman

2 Answers

2
votes

You may try:

install.packages("kknn")
library(kknn)
1
votes

Based on your edit: goto R/win-library/3.2 folder, find the folder kknn and delete it. restart your R session then reinstall the package.

install.packages(kknn)
library(kknn)