Chart a map with highcharter - r

I am trying to chart a map with highcharter using the hcmap function:
devtools::install_github("jbkunst/highcharter")
library(highcharter)
hcmap("custom/south-america")
However, I get the following error:
Installing tidyr
Downloading GitHub repo RcppCore/Rcpp#master
from URL https://api.github.com/repos/RcppCore/Rcpp/zipball/master
Error: Could not find build tools necessary to build Rcpp
> library(highcharter)
> library(Rcpp)
Warning message:
package ‘Rcpp’ was built under R version 3.3.2
> hcmap("custom/south-america")
Error: could not find function "hcmap"

Related

What to do when the package (qpcR) downloads in R but cannot use a function in the package?

I am trying to run an old script and I successfully downloaded the qpcR package. However, it will not let me use the HQIC command. I have tried uninstalling qpcR and reinstalling it. I keep getting the following error down below. What can I do?
Loading required package: MASS
Warning: package ‘MASS’ was built under R version 4.0.5
Loading required package: minpack.lm
Loading required package: rgl
Loading required package: robustbase
Warning: package ‘robustbase’ was built under R version 4.0.5
Loading required package: Matrix

Error: package or namespace load failed for ‘CGPfunctions’ [duplicate]

I am getting the following error when I am loading a few libraries in R:
library(forecast)
Error : object ‘f_eval’ is not exported by 'namespace:lazyeval'
In addition: Warning message:
package ‘forecast’ was built under R version 3.3.2
Error: package or namespace load failed for ‘forecast’
library(tsoutliers)
Error : object ‘f_eval’ is not exported by 'namespace:lazyeval'
In addition: Warning message:
package ‘tsoutliers’ was built under R version 3.3.2
Error: package or namespace load failed for ‘tsoutliers’
I have tried reinstalling the packages but it didn't help. Also, I was able to use the forecast package previously but I started facing this error post the installation of tsoutliers package.
How can I resolve this issue?
This should do the job for you:
install.packages('lazyeval')
In the future, try and provide a bit more about your system and install, using the output from:
sessionInfo()

error after installing ggmap in r

I installed package ggmap. But when I wanted to use it , I got following error:
library(ggmap)
loading required package ggplot2
Error in readRDS(nsINFoFilePath) : unknown input format
Error: package or namespace load failed for 'ggmap'
I also uninstalled it using utils and reinstalled but same error appears again.
Try uninstalling ggplot2 first:
uninstall.packages("ggplot2")
and then installing both ggplot2 and ggmap.

Rcmndr plugin not running

I am trying to run this rcmndr plugin for my class and it's not working. I installed all the necessary packages and it appeared to install correctly but I am getting this package or namespace load failure. The GUI appears for a split second when I enter the library command, then disappears with the error. It seems to be an issue with the namespace and .onattach but I couldn't find any existing answers or resources for this issue.
https://cran.r-project.org/web/packages/RcmdrPlugin.BCA/index.html
> library(RcmdrPlugin.BCA)
Loading required package: Rcmdr
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: sandwich
Rcmdr Version 2.2-3
Loading required package: BCA
Warning: package 'BCA' was built under R version 3.2.3
Loading required package: flexclust
Warning: package 'flexclust' was built under R version 3.2.3
Loading required package: grid
Loading required package: lattice
Loading required package: modeltools
Loading required package: stats4
Error : .onAttach failed in attachNamespace() for 'RcmdrPlugin.BCA', details:
call: get(Menus[m, 5])
error: object 'importRODBCtable' not found
In addition: Warning messages:
1: package ‘RcmdrPlugin.BCA’ was built under R version 3.2.3
2: package ‘Rcmdr’ was built under R version 3.2.3
3: package ‘RcmdrMisc’ was built under R version 3.2.3
4: package ‘car’ was built under R version 3.2.3
Error: package or namespace load failed for 'RcmdrPlugin.BCA'
I got alternative to run this plugin in R commander.
Open R Commander by using:
library(Rcmdr)
R Commander dialogue box will appear.
In R Script load BCA library-
lapply(list('BCA', 'splines', 'RcmdrMisc', 'car', 'sandwich', 'flexclust', 'grid','lattice','modeltools','stats4','RODBC'), require, character.only = TRUE)
Click on Submit button.
If you don't have RODBC package (which is not there in my case), install it separately and then run above commands. To install use:
install.packages("RODBC")
And now you exactly have what you will get after loading RcmdrPlugin.BCA library.
I faced a similar situation. Having tried a bunch of things - none worked - I finally uninstalled R and deleted the remaining files from under the "Program Files" directory in Windows. I then reinstalled R and RcmdrPlugin.BCA and this time it worked.
You could also refer to this URL for help http://r.789695.n4.nabble.com/Unable-to-run-RcmdrPlugin-survival-using-3-2-2-with-Windows-10-td4711796.html

Error when running library(ggplot2)

I just updated to R 2.11.1 and after installing ggplot2, I tried
library(ggplot2)
and got
Loading required package: proto
Loading required package: grid Loading
required package: reshape Loading
required package: plyr Loading
required package: digest Error in
eval(expr, envir, enclos) : could not
find function "proto" In addition:
Warning message: In library(package,
lib.loc = lib.loc, character.only =
TRUE, logical.return = TRUE, :
there is no package called 'proto'
Error : unable to load R code in
package 'ggplot2' Error:
package/namespace load failed for
'ggplot2'
Any help appreciated.
install.packages('ggplot2', dep = TRUE) would do the trick... install proto package
Open R shell and type following in it
install.packages('ggplot2', dep = TRUE)
then it will ask you to select the mirror, select closest one and it will install it and solve your problem.
Also have had troubles, when installing ggplots2, but here is a curious solution (tested on windows):
I installed via RStudio. Both from Tools->install packages and by typing install.packages("ggplots2", dep=T). It didn't work because it kept not installing the dependencies.
I then installed direct by R gui install.packages("ggplots2", dep=T) and everything went well.
I had the same problem and this did the trick.
Install the lazyeval package.
Then install ggplot2
Load the ggplot2 library and everything will hopefully work fine.
Steps
1.Go To -> Tools
2.Click -> Install Packages
3.In Packages Text Box Type ggplot2
Check the checkbox & install dependencies
And your good to go !

Resources