Reputation: 15
I am trying to load the choroplethr
package in R and keep getting an error message that I can't troubleshoot or understand. If someone could please provide me with a workaround to fix this that would be appreciated.
install.packages("choroplethr")
install.packages("choroplethrMaps")
library(choroplethr)
library(choroplethrMaps)
Loading required package: acs
Loading required package: stringr
Loading required package: XML
Attaching package:
acs
The following object is masked from
package:base
:apply
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘htmlTable’ In addition: Warning messages: 1: package ‘choroplethr’ was built under R version 3.2.5 2: package ‘stringr’ was built under R version 3.2.5 3: package ‘XML’ was built under R version 3.2.5 Error: package or namespace load failed for ‘choroplethr’
Thank you, Kelly
Upvotes: 1
Views: 1475
Reputation: 1972
I am the package author and unfortunately I often have users report errors like this.
Technically, when you install an R package all of the packages needed to run that package are supposed to automatically get installed. In practice, however, that does not always happen. The key part of the first error message you report is this:
Error ... there is no package called ‘htmlTable’
In response to that error message I would simply manually install the htmlTable package and then reinstall choroplethr:
install.packages("htmlTable")
install.packages("choroplethr")
Reading the comments from your initial question it seems like you were able to get past this error message but then ran into another one. Again, the key part of that error message seems to be the following:
Error ... there is no package called ‘rlang’
I would address this error in the same way. Ie type:
install.packages("rlang")
install.packages("choroplethr")
Again, I have no idea why errors like this seem to sporadically occur when people try to install choroplethr (and presumably other packages as well). However, the fix that always seems to work is manually installing the package which R complains it cannot find.
Upvotes: 0