Problem installing tidyverse

I'm a student on a Mac M1. Getting finals done this week, my current issue poses a roadblock.

I've updated to RStudio-2022.02.1-461 and am having trouble running tidyverse and dplyr functions. I wasn't having these issues before the update. I've deleted R and R Studio, reinstaIled, restarted my machine, etc. I get the following errors. Any thoughts?

The magrittr package seems to install but then I'm told...

"There are binary versions available but the source versions are later:
Do you want to install from sources the packages which need compilation? (Yes/no/cancel)"

Where do I go from here? Typing "Yes" and hitting enter in the console hasn't seemed to solve the issue.

We need to see the console output you get after you type "yes" to see what is going wrong.

Also, including install commands within Rmd documents is a bad idea, they will reinstall each time you knit the document.

Thanks @andresrcs I appreciate you being willing to help. I'd like to back up for a moment.

I deleted R and R Studio, restarted my machine and reinstalled the latest versions for Mac M1. I'm running 2022.02.1 Build 461. I simply go to the drop down menu and attempt to open a new RMD file, I'm told that I need to update/install maggritr. I do that (see attached screen grab) and then go back to the drop down to open a new RMD file and again I'm told I need to update magrittr. Thoughts?

Unless you absolutely need the latest version of those tidyverse packages, I suggest you avoid compiling them from source code and stick with the slightly older pre-compiled binaries. Just answer no to "Do you want to install from sources the packages which need compilation? Yes/no/cancel". It will install the binary versions instead.

The latest version of maggritr is only available as source version which needs compilation, in order to compile packages from source on MacOS you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.
https://cran.r-project.org/bin/macosx/tools/

I will also suggest that you install R 4.1.3. Until last week it was the latest and greatest version of R. The process of compiling the latest versions of all 19,000 packages for the newer R 4.2 takes time, but they are likely already compiled for R 4.1.3. Get through your finals first, then update to R 4.2.

@EconProf Thank you! HUGE thanks! Saying "no" to compliling from source code was the key. And I hear you on sticking with 4.1.3, that sounds like a sensible idea.

andresrcs—I apprecuiate your input as well. Running install code in the console now, rather than the Rmd document. If there's a better way, I'm happy to learn.

Thanks again to yuou both.

You install packages just once using the install.packages() function. There is no need to do that in every R session. You access the packages that were installed in your library using the library() function. You can include that at the start of Rmd files.

And good luck with the end of the semester!!! I am teaching my last class before retirement this spring.

Yes, understood on the library vs. install functions. I'm good there!

Thanks and I hope you enjoy a little relaxation soon. Good luck in retirement.

Is there a definitive link for the download of previous versions of R? I've found the following two sites but neither really look like exactly what I'm after.

https://cran.r-project.org/src/base/R-4/
https://dailies.rstudio.com/version/2021.09.2+382.pro1/

Hoping for a link to download the install package for version 4.1.3 and earlier.

cran.r-project.org, click download for macos, scroll down to big-sur-arm64, then click on base

Thanks again for all your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.