Any problem with upgrading version of R in R Studio?

Are there any drawbacks to upgrading the version of R underneath R Studio?
I vaguely recall posters who have suggested that upgrading versions of R Studio can be problematic.
Would there be any drawbacks to upgrading the R that is accessed by RStudio?
I am now receiving constant messages from RStudio telling me that a package that I want is not
available for my R3.6.0 version. I want gg3d! Can I upgrade to R 4.0.0 worry free?

Not hassle free, but it is doable.

On the other hand, your R version is not your problem, you are getting that message because gg3D is not on CRAN, you have to install it from GitHub

Thank you andresrcs!

ERRR! I did what you suggested and then gg3d failed on lazy loading with a mention on ggplot2 related to R 3.6.3! Any suggestions would be very much appreciated.

Can you post the whole error message? otherwise, we don't have enough information to help you out.

Thank you again andresrcs. RStudio is great software, though from time to time there are snags.
I am also now having trouble with ggplotgui. I also had trouble with it in an R Markdown file, though this might have been due to my adding a call to plotly() along with a ggplotgui call in the same file: might have been just too much to take.

I am not sure about the gg3D call.

library("ggplotgui")
package �ggplotgui� was built under R version 3.6.3Error: package or namespace load failed for ‘ggplotgui’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.4.5 is already loaded, but >= 0.4.6 is required

devtools::install_github("AckerDWM/gg3D")
Downloading GitHub repo AckerDWM/gg3D@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: ellipsis (0.3.0 -> 0.3.1) [CRAN]
5: rlang (0.4.5 -> 0.4.6) [CRAN]
6: glue (1.4.0 -> 1.4.1) [CRAN]
7: backports (1.1.6 -> 1.1.7) [CRAN]
8: ps (1.3.2 -> 1.3.3) [CRAN]
9: vctrs (0.2.4 -> 0.3.0) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
1
ellipsis (0.3.0 -> 0.3.1) [CRAN]
rlang (0.4.5 -> 0.4.6) [CRAN]
glue (1.4.0 -> 1.4.1) [CRAN]
backports (1.1.6 -> 1.1.7) [CRAN]
ps (1.3.2 -> 1.3.3) [CRAN]
vctrs (0.2.4 -> 0.3.0) [CRAN]
Installing 6 packages: ellipsis, rlang, glue, backports, ps, vctrs
Installing packages into �C:/Users/Documents/R/win-library/3.6�
(as �lib� is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/ellipsis_0.3.1.zip'
Content type 'application/zip' length 45992 bytes (44 KB)
downloaded 44 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.6.zip'
Content type 'application/zip' length 1129315 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/glue_1.4.1.zip'
Content type 'application/zip' length 154103 bytes (150 KB)
downloaded 150 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/backports_1.1.7.zip'
Content type 'application/zip' length 81581 bytes (79 KB)
downloaded 79 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/ps_1.3.3.zip'
Content type 'application/zip' length 333928 bytes (326 KB)
downloaded 326 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/vctrs_0.3.0.zip'
Content type 'application/zip' length 1123563 bytes (1.1 MB)
downloaded 1.1 MB

package ‘ellipsis’ successfully unpacked and MD5 sums checked
cannot remove prior installation of package �ellipsis�problem copying C:\Users\Documents\R\win-library\3.6\00LOCK\ellipsis\libs\x64\ellipsis.dll to C:\Users\Documents\R\win-library\3.6\ellipsis\libs\x64\ellipsis.dll: Permission deniedrestored �ellipsis�package ‘rlang’ successfully unpacked and MD5 sums checked
cannot remove prior installation of package �rlang�problem copying C:\Users\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\Documents\R\win-library\3.6\rlang\libs\x64\rlang.dll: Permission deniedrestored �rlang�package ‘glue’ successfully unpacked and MD5 sums checked
cannot remove prior installation of package �glue�problem copying C:\Users\Documents\R\win-library\3.6\00LOCK\glue\libs\x64\glue.dll to C:\Users\Documents\R\win-library\3.6\glue\libs\x64\glue.dll: Permission deniedrestored �glue�package ‘backports’ successfully unpacked and MD5 sums checked
cannot remove prior installation of package �backports�problem copying C:\Users\Documents\R\win-library\3.6\00LOCK\backports\libs\x64\backports.dll to C:\Users\Documents\R\win-library\3.6\backports\libs\x64\backports.dll: Permission deniedrestored �backports�package ‘ps’ successfully unpacked and MD5 sums checked
cannot remove prior installation of package �ps�problem copying C:\Users\Documents\R\win-library\3.6\00LOCK\ps\libs\x64\ps.dll to C:\Users\Documents\R\win-library\3.6\ps\libs\x64\ps.dll: Permission deniedrestored �ps�package ‘vctrs’ successfully unpacked and MD5 sums checked
cannot remove prior installation of package �vctrs�problem copying C:\Users\Documents\R\win-library\3.6\00LOCK\vctrs\libs\x64\vctrs.dll to C:\Users\Documents\R\win-library\3.6\vctrs\libs\x64\vctrs.dll: Permission deniedrestored �vctrs�
The downloaded binary packages are in
C:\Users\AppData\Local\Temp\RtmpGe57sV\downloaded_packages
√ checking for file 'C:\Users\AppData\Local\Temp\RtmpGe57sV\remotes49a473d34dc\AckerDWM-gg3D-ffdd837/DESCRIPTION' (557ms)

  • preparing 'gg3D':
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'gg3D_0.0.0.9000.tar.gz'

Installing package into �C:/Users/Documents/R/win-library/3.6�
(as �lib� is unspecified)

  • installing source package 'gg3D' ...
    ** using staged installation
    ** R
    ** byte-compile and prepare package for lazy loading
    Error: (converted from warning) package 'ggplot2' was built under R version 3.6.3
    Execution halted
    ERROR: lazy loading failed for package 'gg3D'
  • removing 'C:/Users/Documents/R/win-library/3.6/gg3D'
    installation of package �C:/Users/AppData/Local/Temp/RtmpGe57sV/file49a47f5e58b2/gg3D_0.0.0.9000.tar.gz� had non-zero exit status

Yeah! I was able to solve a problem that I was having.
plotly needed rlang 0.4.6 but 0.4.5 was installed.
The easy fix turned out to be delete rlang 0.4.5 and install rlang 0.4.6.

This suggest you have these packages loaded, try restarting RStudio and try to install again before loading any package.
If the problem persist, then you have to check your user's write permissions on that folder.

I am getting better at this. I deinstalled all of the packages and then reinstalled them.
The error I am now receiving is the last 4 lines from my previous post.
I am not sure what I can do now.

Can you show the actual error message?

Downloading GitHub repo AckerDWM/gg3D@master
√ checking for file 'C:\Users\AppData\Local\Temp\RtmpqKLnXC\remotes14442b2e15a3\AckerDWM-gg3D-ffdd837/DESCRIPTION' (621ms)

  • preparing 'gg3D':
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts (361ms)
  • checking for empty or unneeded directories
  • building 'gg3D_0.0.0.9000.tar.gz'

Installing package into �C:/Users/Documents/R/win-library/3.6�
(as �lib� is unspecified)

  • installing source package 'gg3D' ...
    ** using staged installation
    ** R
    ** byte-compile and prepare package for lazy loading
    Error: (converted from warning) package 'ggplot2' was built under R version 3.6.3
    Execution halted
    ERROR: lazy loading failed for package 'gg3D'
  • removing 'C:/Users/Documents/R/win-library/3.6/gg3D'
    installation of package �C:/Users/AppData/Local/Temp/RtmpqKLnXC/file14441cb245bc/gg3D_0.0.0.9000.tar.gz� had non-zero exit status

To avoid error from warning conversion you can try running this command before installing the package

Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")

Thank you andresrcs. The error was suppressed on install. Yet, when I call the library I receive the message:

Error in value[3L] : Package ‘ggplot2’ version 3.1.1 cannot be unloaded: Error in unloadNamespace(package) : namespace ‘ggplot2’ is imported by ‘ggrepel’, ‘gganimate’ so cannot be unloaded

  1. stop(gettextf("Package %s version %s cannot be unloaded:\n %s", sQuote(package), oldversion, paste0(P, conditionMessage(e), "\n")), domain = NA)

  2. value[3L]

  3. tryCatchOne(expr, names, parentenv, handlers[[1L]])

  4. tryCatchList(expr, classes, parentenv, handlers)

  5. tryCatch(unloadNamespace(package), error = function(e) { P <- if (!is.null(cc <- conditionCall(e))) paste("Error in", deparse(cc)[1L], ": ") else "Error : " ...

  6. library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc, quietly = quietly)

  7. .getRequiredPackages2(pkgInfo, quietly = quietly)

  8. library(gg3D)

I think gg3d is now loaded, despite the above error. I am not totally sure because some of the functions
that are presumably part of gg3d do not appear to be available (for example, plot_grid).

plot_grid is not part of gg3d, it is part of the cowplot package. (This could have been made more clear in the gg3d example, I think.)

Thank you willwheels. It is not always which R packages belong to which functions. I think that there is probably a fair amount of overlap with the use of functions such as cor etc.