Unable to install ggstatsplot

Hi, I'm trying to install the ggstatsplot package in R studio but keep getting this error message:
Error in library(ggstatsplot) : there is no package called ‘ggstatsplot’

I have tried the command: install.packages("ggstatsplot") and R Studio seems to do something, install something, but when I tried loading ggstatsplot, the error still appears.

I am not sure what I did wrong. I would really appreciate if anyone could help me out as I am very new to this coding.

Thank you.

Can you please post the complete console output you get when you run this command?

Hi, here are the screenshots. I can't copy and paste in because apparently I'm a new user and cannot post more than 2 links (which are present in the output). I will have to make it multiple posts because of the restrictions (so frustrating).

second one.

Last one.

You shouldn't post console output as screenshots, you should post it as formatted code instead. Here is how to do it.

Now about your problem, you are choosing to install the latest versions of those packages from source but you do not have the necessary tools installed in your system.

You can either answer "no" when asked to install from source and install older binary versions or install Xcode in your system (not in R) and the recommended development tools for macOS systems.

Thank you. I will give it a try and will let you know.
I do have a quick question, how come I never had to install Xcode before? Is it something specific to ggstatsplot? Because I was able to run ggplot2 and tidyverse etc. without ever heard of Xcode before so this is new to me.

Thank you

Because so far you where installing packages from precompiled binaries, so, no need for compiling tools. Binaries for the latest package versions are only available for the latest R version and since the one you are using is fairly old, you are now forced to compile from source to get the latest package versions.

No, Xcode is a tool you need to compile packages from source in general, not just this one.

So I tried and press No instead of yes. And it seems to install ggstatsplot. However, when I actually run one of the commands ggbetweenstats, a popup window appears and said R session aborted, something along the line of it has encountered a fatal error. Do you think this can be solved if I update R to the latest version?

There is no way to know the cause with so little information.

R session crashes are very often due to running out of RAM memory. Have you checked your memory allocation when executing the code?

If this doesn't solve your problem, I recommend you to open a separate topic for this new problem, including a REPRoducible EXample (reprex) illustrating your issue.