How can I resolve this error when installing r packages? - r

I want to try this geopspatial mapping tutorial but I can't get the tmap or tmaptools packages to install/load properly. Here are some screenshots of the installation.
and and results in this problem when I try to load the libraries
If anyone could explain what the problem is and how I could fix it I would appreciate the help.

#user2554330 was right, there was a C compiler I had previously installed for a class that was interfering with the installation of the packages. I just renamed the directory of the compiler and everything worked.

Related

Cannot Install Library

I'm fairly new to R and have never had this issue before. I am running R v4.0.3.
I am trying to install the Tveten/capacc library for R and I am getting the following errors:
Error using install.packages
Error using devtools
I have also been to GitHub, followed the advice there and installed and ran through the source with the same error.
https://rdrr.io/github/Tveten/capacc/
If anyone has any advice, it would be very much appreciated!
EDIT: Changed names of images.

Trouble accessing help documentation for a package I created

I'm new to R so I hope this isn't incredibly obvious. I created a package that contains two functions. I provided documentation using roxygen2 for each of the functions, documented and built the package as well as installed and restarted multiple times. I also pushed it up to github and have done everything I can think of to do, yet I cannot access the help files that I created. I always receive this error:
No documentation for ‘myfunc’ in specified packages and libraries: you
could try ‘??myfunc’
Not only is ?myfunc not working, but when I attempt to install my own package to my own RStudio console, but I also receive this error:
Warning in install.packages : package ‘yourpackage*’ is not
available (for R version 3.6.1)
What exactly is going wrong here, and how can I attempt to fix it? I've built packages before and this time I've followed all the same steps I've been taught to use and have used in the past, but for some reason, I'm being met with these errors. I would appreciate any and all help you all have to offer. Thank you in advance!

Going crazy trying to install Quantstrat

I am trying to install quanstrat. So far I have downloaded Rtools35 I am using R 3.5.1 when i use the code
devtools::install_github("braverock/blotter")
I receive this error
Downloading GitHub repo braverock/blotter#master
Error: Could not find tools necessary to compile a package
Here is the path
Sys.getenv('PATH')
[1] "C:\\Program Files\\R\\R-3.5.1\\bin\\x64;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Users\\Jordan\\AppData\\Local\\Microsoft\\WindowsApps;"
Your help is much appreciated thank you! If there is a better alternative to quanstrat please let me know!
I FINALLY figured it out. You CAN NOT do this in Rstudio. You have to do it in R. Uhhh why did they make that so difficult?

Error: package or namespace load failed for ‘arulesViz’: object ‘cividis’ is not exported by 'namespace:viridisLite'

In R 3.4.3 (Windows 10) while loading the packages arulesViz:
Error: package or namespace load failed for ‘arulesViz’: object ‘cividis’ is not exported by 'namespace:viridisLite'
I tried to uninstall and install, but did not help. What is wrong and how can i correct it?
Basically you need to install the dependencies of arulesViz.
I tried with Scatterplot3d , viznetwork, vcd, virdislite.
I also faced similar problem.
This problem can be resolved by installing package "viridisLite" along with "arulesViz"
for me it worked no need to reinstallthe R or Rstudio
It get solved , after reinstall RStudio + removed old version of R.
Disadvantage is all libraries will also get removed. So you have to load again.
I had the same issue with the seriation package. Ultimately I found that I just had to uninstall and reinstall r and r studio. Then i ran update.packages() and I had no problems.
This is a pain, as there are several packages with dependencies for packages which in turn import viridisLite, and this error is very opaque for users...
One thing I've found works (apart from manually install.packages("") each package mentioned in the error) is to switch repositories to the RStudio-maintained Cloud repo. (repo 0).
The problem seems to have hit people with a default repo that has incompatible versions of packages at the time people use it, and the cloud repo seems to avoid/not suffer from this problem.
Hope this helps

How to remove R package that has dependencies on other packages?

I've installed a R package (PathRanker) that depends on packages (xml,Rgraphviz,Rcurl). I've noticed that the all the packages' folders inside the library shows some sort of a locked sign.
I tried to remove PathRanker using the R CMD REMOVE but it didnt works. I tried to reinstall the package (which I kindda mess around with the code) it also didnt works. So I think it got something to do with the dependency packages. Can someone help me? thanks...
You might have installed the packages as root (if you are using Linux), and trying to remove the package as normal user.
Start an R session as root (sudo R), and try to remove (see: ?remove.packages) the packages in this environment. Or from console:sudo R CMD REMOVE (package name)
If still not working, please write more about the error messages.

Resources