Problem with ggpubr

I tried to use library"survminer" but this error appeared:

Loading required package: ggpubr
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘tidyselect’
Error: package ‘ggpubr’ could not be loaded

When I tried to install ggpubr. This shows:

Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘tidyselect’

I reinstatt R and Rstudio. I updated both of them to the lasted version but the problem still there?
Any suggestions?

Try manually installing tidyselect first:

install.packages("tidyselect")

Also, just in case it's not a typo, when you attach a library, the proper syntax is library(survminer).

Thanks for replying. I tried that too. And, this is what appeared:

installing the source package ‘tidyselect’

trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_0.2.5.tar.gz'
Content type 'application/x-gzip' length 21883 bytes (21 KB)
==================================================
downloaded 21 KB

* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tidyselect’

This means that you're missing Xcode Command Line Tools (I'm assuming you're on a Mac). Even though this post is for El Capitan, I know the same holds for Sierra (and I assume High Sierra, and Mojave, even, though you might want to search around a bit if you're on the last one).

https://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/

Yes, unfortunately, I am on the last version on Mac.
thanks

From a quick search it looks like people had some (resolvable) trouble when Mojave was still in Beta, but it should be fine now:
https://www.embarcadero.com/starthere/xe5/mobdevsetup/ios/en/installing_the_commandline_tools.html

That's solved the problem.

Thank you so much.

1 Like