in coding language R why will the caret function not download
correctly. it does not allow me to use train function or confusion
Matrix. How do I correctly install caret package?
UD 66 install. packages ("caret") library (caret) finstall. packages ("e1071") library (e1071) 71 #20 set. seed (456) 75 #21 knnFit1 <- train(Survived-, data = Train, method = "nn") NNNN 00 #22 knnFiti #23 #24 84 kn Predi <- predict (knnFiti, test(-Survived)) 85 69:1 (Top Level) R Script Jobs Console Terminal - oceeuilly. https://cran.rstudio.com/bin/windows/Rtools/ Installing package into 'C:/Users/glenn/OneDrive/Documents/R/win-library/3. as 'lib' is unspecified) trying URL"https://cran. rstudio.com/bin/windows/contrib/3.6/caret_6.0-84.2 ip Content type 'application/zip' length 6236702 bytes (5.9 MB) downloaded 5.9 MB package 'caret' successfully unpacked and MD5 sums checked The downloaded binary packages are in C:UsersglennAppDataLocalTempRtmps D395Ndownloaded_packages > library(caret) Error: package or namespace load failed for 'caret' in loadNamespace(j <- i [[1]], (lib. loc, .libPaths O), versioncheck = VI[[j]]): there is no package called "data. table'
Answer
ANSWER:-
since,the error shown is "there is no package called
data.table".so,we have to install this package "data.table".To
install the package "data.table" type this:-
install.packages('data.table')
Now, to see if the caret is present or not type:-
library(caret)
Otherwise type:-
install.packages("caret", dependencies = c("depends" ,
"suggests"))
Again , if any error such as:- there is no package called tibble
.Then intall the tibble package:-
install.packages('tibble')
Thank you!