Unused package dependency not building when deploying shiny app - r

I'm attempting to deploy my shiny app to shinyapps.io but I'm getting a build error for gWidgetstcltk (0.0-55). gWidgets is a dependency for one of the packages I use in my app. However, I only use a few functions from this package that don't require gWidgets.
I tried deploying on Windows and Ubuntu with no success. I tried installing TK8.5 (required for gWidgetstcltk) but this did not help any. Ideally if there was a way I can force the app to build without this dependency the app should still work. Alternatively, is there a way I could remove this dependency from the package itself?
Error message:
Warning: no DISPLAY variable so Tk is not available
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
[tcl] invalid command name "font".
Error : unable to load R code in package ‘gWidgetstcltk’
ERROR: lazy loading failed for package ‘gWidgetstcltk’
* removing ‘/opt/R/3.4.4/lib/R/library/gWidgetstcltk’
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 643000037 failed: Error building image: Error building gWidgetstcltk (0.0-55). Build exited with non-zero status: 1

Related

Error in installing R package asreml on mac

I'm not too familiar with R and are using it for Uni, and we need this asreml package for one of our classes. When I try installing it this error comes up:
Error: package or namespace load failed for ‘asreml’:
.onLoad failed in loadNamespace() for 'asreml', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-asreml/00new/asreml/libs/libvsninet.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-asreml/00new/asreml/libs/libvsninet.so, 0x0006): tried: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-asreml/00new/asreml/libs/libvsninet.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/asreml’
Warning in install.packages :
installation of package ‘/Users/Cami/Downloads/asreml-4.1.0.176-macOS-10.13.2-R4.2.tar.gz’ had non-zero exit status
I tried installing it on R both with a full path to the file and with a working directory set up. I've also tried to install it directly through the computer terminal, however, the same error comes up. A tutor in class has also tried to open a library for the package through the terminal on my laptop and it also didn't work. Neither of us are sure of what 'libvsninet.so' means. I've also tried to disinstall and reinstall both R and RStudio, but the result is the same.

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?

loading failed error when install R package from github

I am working on Bayesian inference and I want to install bayesVAR_TVP package from Github. I tried the following commands:
install.packages("devtools")
library(devtools)
install_github("GediminasB/bayesVAR_TVP")
and
install.packages("githubinstall")
gh_install_packages("bayesVAR_TVP")
In both case I received the following error:
Error: package or namespace load failed for 'bayesVARTVP' in library.dynam(lib, package, package.lib):
DLL 'bayesVAR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
Error: package or namespace load failed for 'bayesVARTVP' in library.dynam(lib, package, package.lib):
DLL 'bayesVAR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Hamed/Documents/R/win-library/3.4/bayesVARTVP'
In R CMD INSTALL
Installation failed: Command failed (1)
I have checked some similar questions on this site but they could not help me. I am working on a Win 7 64b and R 3.4.3. Also, my friend has a similar error on mac system. Does anyone have any idea? Thanks beforehand.

Unhandled Exception error when publishing a Shiny app

I want to publish a shiny app. Therefore I am using the rsconnect package:
I do the following:
rsconnect::setAccountInfo(name='my_name',
token='my_token',
secret='my_secret_token')
setwd("yourwd")
library(rsconnect)
deployApp()
This however gives my the following error:
Error: Unhandled Exception: Child Task 502660937 failed: Error building image: Error fetching shiny (1.0.5.9000) source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package: shiny (1.0.5.9000)
In addition: Warning message:
In FUN(X[[i]], ...) :
Failed to infer source for package 'shiny'; using latest available version on CRAN instead
Any thoughts on what goes wrong here?

Unknown R package build error

I am trying to build my R package using RStudio with roxygen2. It runs through all the code fine (there is C++ code for which I am using Rcpp and there is nothing out of the ordinary during compilation either) but once it finishes going through the documentation
heavily truncated...
...
Writing NAMESPACE
it stops with the error:
Exited with status -1073741819
I have tried using devtools directly where devtools::document() completes without a problem but devtools::install() errors out with the unhelpful output
ERROR: loading failed
* removing 'C:/Users/.../Documents/R/R-3.3.0/library/gpuR'
* restoring previous 'C:/Users/.../Documents/R/R-3.3.0/library/gpuR'
Error: Command failed (1)
I cannot find any information online regarding what this exit error above could mean. Any insights?
Edit
devtools::build() also fails with the following error:
ERROR: loading failed
* removing 'C:/Users/...~1/AppData/Local/Temp/RtmpqG7nZV/Rinst84a432724f12/gpuR'
-----------------------------------
ERROR: package installation failed
Error: Command failed (1)

Resources