I am new to coding and am having trouble getting started. I want to make sure I am set up to create data visuals and want to access tools like R Markdown and ggplot. I am tryign to download "tidyverse" since I know it carries the ggplot2 feature but I am getting the issue below.
I have received the same issue with other package install attempts on R as well as Python (jupyter). Is there an issue on my path perhaps?
install.packages("tidyverse")
Output:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
I just bought my first mac, an M4 Pro MacBook Pro and finally opened rstudio to get things moving, and ran into several errors trying to get tidyverse to install. I installed both r and rstudio using homebrew and I first installed tidymodels, which took longer than I expected but still worked, when I tried to install tidyverse I kept getting error messages, the first told me I needed to install harfbuzz, fribidi, and freetype, so I used homebrew to install these. I tried again, and got another error message telling me I needed libpng, libtiff, and libjpeg. When I used homebrew to install these it told me to copy and paste the following commands, export LDFLAGS="-L/opt/homebrew/opt/jpeg/lib" export CPPFLAGS="-I/opt/homebrew/opt/jpeg/include" Once I finally did this I was able to successfully install tidyverse. I am here hoping someone from the Posit team will see this and tell me if there was another easier way to do all of this. I am new to macOS and I don't know if I ran into these issues because of using homebrew to install both r and rstudio, but just want to understand why I ran into these issues. I still have the error messages saved, I don't know how much space I have to type my message in here but can supply error messages if need be, thanks so much!
I suggest you don't use homebrew to install R, but use the official CRAN installer instead. Or, even better, use GitHub - r-lib/rig: The R Installation Manager and then you can easily switch between versions.
Homebrew R builds all CRAN packages from source, that's why you get compilation issues. No such problems with CRAN R.
(Btw. your message does not seem to have much to do with the original post, which is about Windows.)
apologies, I thought given the heading "issues installing packages like tidyverse and R markdown" that this was a general place to ask questions, not just for people using windows. I do appreciate your advice though. I knew something was up when it was taking quite a while to install tidymodels. I realize now that it was installing from source, don't know why I did not think of that.