Can't install any packages in R - r

Title says the core of it. I've been wanting to learn R and I thought that swirl sounded nice. I can't get swirl to install, so just as an experiment I tried another package. I get the same error message. I'm getting this in both R and R Studio.
My input and error message are here:
install.packages("swirl")
## package ‘swirl’ is available as a source package but not as a binary
## Warning message:
## package ‘swirl’ is not available (for R Under development)
The first time I tried it I did get to chose a CRAN mirror, but otherwise I've been just spinning my gears.
I'm on a Mac and running OS X Yosemite, I tried looking for any issues similar to this and I am stuck. Any help is appreciated.

It looks like you're using a bleeding edge version of R ("R Under development").
Downgrade to the latest stable version and you should be fine.

Related

R studio install package failed

I tried to install the packages in the following way:
pacman::p_load(tidyverse, lubridate, zoo,
timetk, modeltime,
trelliscopejs, seasonal,
tsibble, feasts, fable)
However, I got the below errors:
I'm not sure what's wrong, I'm using the latest R version 4.2.1, the warning seems to suggest that need to change to 4.1.3, is there anyway to install those packages without changing the version?
The problem is not related to the package in itself. The warning about the version only tells you that the last time this package was built was on R 4.1.3, but it should work on R 4.2.
The problem is that the place where R searches this package doesn't exist. If you go here: https://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/, you will see that the last version of R is 3.4, whereas you're looking for a package built in R 4.1 (see the version in the URL address in the error message).
Here's some advice to solve this (I can't reproduce your problem so I can't be sure this works): if you're using RStudio, go to "Tools -> Global Options -> Packages". I think that under "Primary CRAN repository", there should be the name of the current place where R searches for the files to install each package. You can change this: either pick "Global (CDN) - RStudio" or any other that is not too far from your location. Then restart R and try reinstalling the 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.

package ‘titletoc’ in R

I got the error message: "package ‘titletoc’ is not available (for R version 3.6.0)" but I checked MiKTeX Console that the package "titlesec" is in the list of packages and all the packages are updates. I am using a Mac (not sure if it matters).
Then I searched online to try to install the package "titletoc" separately, but I found nowhere to download this package. Something must be wrong, anyone has a clue?

How to install Package MVTNORM

I am trying to install package mvtnorm, but it says that package ‘mvtnorm’ is not available (for R version 3.4.4)....
I believe this is happening cause of R version..... but When I am trying to upgrade R...it is not allowing me to do so.
I tried to install package "installr" for upgrading R, but it showed the same error - "installr’ is not available (for R version 3.4.4).
There is update tab under "HELP" on the console panel of the studio...it is not responding....
I am using Linux machine for the first time...so i am really confused on how to go about.
I hope to get this thing solved with some help from an expert who can guide me on how to proceed.

errors when installing older dplyr package in 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!

Resources