Failed to install bigrquery on RStudio server - r

I recently installed RStudio server on Google Compute Engine and now want to connect to BigQuery. I have successfully installed and loaded packages such as dplyr and ggplot2, but failed to load bigrquery and devtools. Running the code snippet below:
install.packages("bigrquery")
install.packages('devtools')
devtools::install_github("rstats-db/bigrquery")
results in this error message:
Error in loadNamespace(name) : there is no package called ‘devtools’
Loading bigrquery separately also results in similar error message:
Error in library(bigrquery) : there is no package called ‘bigrquery’
I noticed that the installation sent message saying dependencies for the package not available. I didn't get this problem installing and loading bigrquery and devtools on my RStudio desktop. How can I solve this? I'm working on Windows and launch the RStudio server on Google Chrome.

Related

Unable to deployApp due to no 'kable' package

I have been trying to run my first shinyapp from Rstudio.
The app loads but is undeployed. It stops running with the error:
Preparing to deploy application...DONE
Uploading bundle for application: 8122435...Warning in FUN(X[[i]], ...) :
Package 'kable' not available in repository or locally
Error: Unable to retrieve package records for the following packages: - 'kable'
then when trying to install package "kable"
Warning in install.packages :
package ‘kable’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Is this a temporary problem? Is there an easy way to go to an older version of R on a mac? I have tried loading kable package from other repositories aswell.
Any advice?

Error reading file while installing package devtools (R)

I've recently installed devtools looking to create my first package. At some point I tried loading the library, and got an error when 'devtools' tried to load the dependent library 'usethis'. Whenever I'd try to install it I'd get "error reading from connection". All solutions I could find online involved restarting R and my computer. Neither worked.
Finally, I manually deleted the folder, downloaded the .zip file from CRAN, and manually installed 'usethis'. I can now load 'usethis'.
I then tried loading 'devtools' but got the same error, but now for devtools.
> install.packages(pkgs = "C:/Users/.../Downloads/devtools_2.4.3.zip",repos = NULL)
Installing package into ‘C:/Users/.../OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
package ‘devtools’ successfully unpacked and MD5 sums checked
> library(devtools)
Loading required package: usethis
Error: package or namespace load failed for ‘devtools’ in readRDS(nsInfoFilePath):
error reading from connection
In addition: Warning messages:
1: package ‘devtools’ was built under R version 4.1.3
2: package ‘usethis’ was built under R version 4.2.0
3: In readRDS(nsInfoFilePath) : error reading the file
I tried reinstalling the package, both from CRAN and manually. I restarted R and restarted my computer, all multiple times. I even reinstalled 'usethis'.
When I reinstall devtools manually the installation exists without an error. But when I actually load it, I get the error above.
My computer is a standard personal Windows PC. No fancy configurations or firewall (beyond the standard - though that shouldn't be an issue when manually installing anyway I think). I've used this same set up for months, and have installed and used dozens of packages.
Any help would be highly appreciated.

Can't install tmap R Package

I am having trouble installing the tmap R package. I am trying to install it using install.packages("tmap") and mn receiving this error:
Error: package or namespace load failed for ‘tmap’ in namespaceExport(ns, exports):
undefined exports: providers
Error: loading failed
Execution halted
ERROR: loading failed
Warning in install.packages :
installation of package ‘tmap’ had non-zero exit status
I'm new to R, but have tried many of the basic bug fix approaches (Reinstalling R Studio, quitting and restarting a session, installing from a local tar.gz instead of CRAN) but none seem to work. I think the package is being installed successfully but is not being loaded. Is that correct? How would I get tmap to load correctly?
I'm using R vers 3.6.1
Cheers
The object providers is re-exported from leaflet. Please make sure that leaflet is installed correctly, and check if leaflet::providers exists.
I would also strongly recommend to upgrade R to 4.x, if possible. I recall that there were some packages in the dependency/imports tree that didn't work well for R 3.x.

RStudio won't allow me to install the package 'imager'

Installed RStudio using Anaconda Navigator even though I already had RStudio and it was working fine before. The package 'imager' didn't load so I removed the application from Navigator and completely uninstall R and RStudio from my Macbook and reinstalled R and the application through Navigator, but that didn't fix things. Other packages install just fine. The following is the error message:
library(imager)
Error: package or namespace load failed for ‘imager’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/omeedkashef/Library/R/3.4/library/imager/libs/imager.so':
dlopen(/Users/omeedkashef/Library/R/3.4/library/imager/libs/imager.so, 6): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Users/omeedkashef/Library/R/3.4/library/imager/libs/imager.so
Reason: image not found
I had this same problem. I did not have a problem installing imager from CRAN but did get an error message when trying to load the CRAN-installed package. When I tried installing from GitHub I got the more useful error message saying that X11 was not found (same as #andrii above). I solved all issues by installing X11 by downloading from this site: https://www.xquartz.org/
EDIT: I should mention that this is not a problem with RStudio per se, as the header of the question suggests, but rather just a dependency issue of one package (imager) on a not-explicitly R piece of sofware (X11).

Issue installing rJava on aix7.1.3

I have installed the 32bit version of R 3.1.1 on AIX 7.1.3
I am in the step of installing the rJava package from the R shell using the command: install.packages("rJava")
However, I am getting this error:
Warning: unable to access index for repository http://cran.utstat.utoronto.ca/src/contrib
Warning messages:
1: In open.connection(con, "r") : unable to resolve 'cran.r-project.org'
2: package 'rJava' is not available (for R version 3.1.1)
It seems that R is unable to connect to the internet to download the package.
I have tried several mirror sites.
Any idea how to resolve this issue in AIX?
Is there also an alternative option to install rJava manually not through the install.packages() R command?
You could try to compile the package with devtools:
install.packages('devtools')
devtools::install_github('s-u/rJava')
Make sure to have the correct javac in your path.

Resources