errors when installing older dplyr package in R - r

Im a bit new to R and need to use/adapt someone else code in R.
My supervisor uses R version 3.2.2 with the dplyr package version 0.4.3 (to overcome errors and problems with the original code).
I tried to install the older dplyr package with different methods:
- installed devtools package and then used the url devtools::install_url("http://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.1.2.tar.gz")
- manual installation (where I downloaded the file and tried to install it.) Installation seemed to have worked but when I run the code it gives a fatal error massage
Every way I've tried so far either gives a lot of error messages or a fatal error and shutdown.
When using help ?dplyr it gives a pop-up that there is an error. Does anybody have any other ideas to install this package?
Thanks!

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.

How to fix error: package 'tzdb' is not available for this version of R

I'm new at R and trying to usetidyverse. The installation seems to go fine, but when I want to load the package, I get this error: there is no package called 'tzdb'. When I try to install 'tzdb' I get a warning that package 'tzdb' is not available for this version of R. I'm using version 4.0.5, which I believe should work.
Any suggestions on how I can get this package to work (so I can start using tidyverse)?
Edit: I've added an image of the code I ran + the outputs of sessionInfo() , options("repos") and .libPaths() below. (I'm sorry I can't copy paste code nor use the browser of the virtual machine that I work from).
https://i.stack.imgur.com/hra1r.png
It does give a warning stating that the CRAN mirror is set to an insecure URL. Could that be the problem? It didnt't seem matter for the other packages.

Error: package or namespace load failed for 'ggplot2': package 'ggplot2' was installed before R 4.0.0: please re-install it Execution halted

I'm really stuck and need some help.
After installing R 4.0.2, I'm getting this error message on R visualizations in Power BI Desktop which were previously working
"Error: package or namespace load failed for 'ggplot2':
package 'ggplot2' was installed before R 4.0.0: please re-install it.
Execution halted"
I already tried to:
reinstall R 4.0.2
reinstall RStudio
reinstall ggplot2
reinstall all packages
reinstall Power BI Desktop. My version is August-2020
Still it does not work.
Considerations:
My visualizations were working well before I installed R 4.0.2
My visualizations are working well on other PCs
When I run the code on RStudio I don't get any error
Any thoughts?
You probably need to go here: https://powerbi.microsoft.com/en-us/support/, but some guesses:
When you did the reinstall, you didn't clean up the old one, so you now have a mix of old and new versions of things. If you can run R code, run
system.file(package="ggplot2")
That's where it is finding the bad version of ggplot2. Get rid of it, and reinstall. If that's not enough, run
.libPaths()
in the broken copy of R. Completely eradicate every directory mentioned there, and reinstall R and all of your contributed packages. (I don't use Power BI, so this might also require you to wipe out some part of it: do so, and reinstall it.)
After all of this, run
packageDescription("ggplot2")
In the last line (or close to it) of what gets printed, you should see something like this:
Built: R 4.0.2; ; 2020-07-16 22:49:23 UTC; unix
If you see that it was built before 4.0.2, then either you missed deleting something, or you (or Microsoft) reinstalled some old version. Then it's probably time to contact that URL above.

Unable to open the R/Cape Package

Currently running R version 3.6.2 and RStudio version 1.2.5033 (both the latest versions as of today).
I have installed the R/Cape package from https://CRAN.R-project.org/package=cape, although when I try to load the package into R studio using:
library(cape)
I get the following from the RStudio console. RStudio then stops responding. I have tried this in just R as well and R also stops responding.
Can anybody please tell me if they've had any similar experiences and how they resolved them? Or if you've managed to install the 'cape' package how you did so?
The 'cape' library depends on other packages like 'htmltools' and many others. This is not an error message, just a warning. It means that some of the functions from 'tools:rstudio' will be replaced by other functions with the same name. See this answer which already addresses this.
As for the non-responsive behaviour, it is probably unrelated to the warnings discussed above. Try reinstalling R and updating all your packages. In Rstudio, you can update all your packages by clicking Tools > Update Packages > Select All > Install Updates.

Use CSV-Import in RStudio fails installing dependencies

I just updated to RStudio 1.0.136 and tried to import a csv. Therefore it wants me to install a package called readr. If I try this, it fails installing its dependency on tibble with error message:
RcppExports.cpp:4:10: fatal error: 'Rcpp.h' file not found
#include <Rcpp.h>
^
Since this seems to be some problem with the package itself and the integration of C++ code, is there anything I can do beside filing a bug report?
I recognised that the error also occured for some other packages such as GGPLOT2. I updated my R version to 3.3 and all packages without success. Finally I ran brew uninstall --force R and brew install R, after that everything went fine. Now I have R version 3.4 installed (even that R reported before, that there was no newer version available).
It sounds like you need to update all of your packages. Go to tools, then check for package updates, and update everything. You should also check that you have the most current version of R installed. If neither of these solve your problem you might want to try reinstalling the Rccp package.

Resources