Having trouble getting the function ggpairs() to work.

I'm following a book to learn R and I've hit a dead-end with using the function ggpairs.
I library ggplot2 and GGally and try to run ggpairs(cars.subset).
When I load GGally I get the following message:

"library(GGally)
Error: package or namespace load failed for ‘GGally’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘vctrs’ 0.5.2 is already loaded, but >= 0.6.0 is required
In addition: Warning message:
package ‘GGally’ was built under R version 4.2.3 "

As a result when I try to run ggpairs I get the following message:

ggpairs(cars.subset)
Error in ggpairs(cars.subset) : could not find function "ggpairs"

As a result I'm in the dark about why ggpairs is not working to create a Scatter Plot Matrix, which is the goal.
The message with GGally also seems to be a problem. I'm not sure what to try next, please Help, if possible,
Thanks
Dave

This suggests hat you need to update vctrs

Restart R and RStudio and do

 install.packages("vctrs") 

Then retry.

Thank you very much @jrkrideau for your help. I updated and installed "vctrs" as you suggested and just like magic it worked. I'm so relieved, thank you. I guess the takeaway for me is that I needed to follow the suggestions that R made and follow through on them. As you can probably tell I'm pretty new to R but I want to learn it, so this has been a big lesson for me.

It also suggested that I don't have "RTools" installed and that I should install the appropriate version. But that didn't stop "ggpairs" from working. I tried to install RTools but it said that I don't have the right version of R. I have 4.2.2. Perhaps I might need to upgrade my R version. But that's another can of worms which I need help on. I'm looking for some good notes on upgrading R version, but that's another problem for another day. I'm so glad that "ggpairs" has worked. How important is it that I have "RTools" installed?
Thanks again for you help.
Dave

Yes but it can take a while to learn to read R help and suggestions. :smiley:

I believe you do need Rtools for a number of things but that is a Windows thing that I really don't know much about. I've been a Linux user for years. I don't think it is immediately neccessary

The current R version is R-4.2.3 but it looks like the current Rtools version should work. See Rtools.

If you have a problem, I'd recommend a new question on the forum.

I

Thanks very much for your help, I appreciate it. And thanks for the suggestions, I shall follow up on them.
Much Appreciated,
Dave

This topic was automatically closed 42 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.