error in using shinyserver - r

I have run shinyAPP in server, some APP doesn't work and error message show as picture, I don't know how to solve it.

It seems there is no dplyr package installed in the library used by the R process which your shiny server is using.
from browser console:
Listening on http://127.0.0.1:56037
Warning: Error in library: there is no package called ‘dplyr’
Stack trace (innermost first):
38: library
1: runApp
Error in library(dplyr) : there is no package called ‘dplyr’
Ensure that you have the package installed in the library folder used by shiny server.
E.g. in my case I have separate R used by RStudio so that development is separated from live app.
My library sits in usr//lib64//R//library therefore in linux i will run R as superuser sudo R and then install.packages("dplyr", lib="usr//lib64//R//library//")

Related

Warning: Error in loadNamespace: there is no package called ‘leafletsector’

I am trying to reverse engineer an R code which is currently running on a Linux Server.
I keep getting the following error:
Warning: Error in loadNamespace: there is no package called ‘leafletsector’
90: <Anonymous>
I tried installing the package leafletsector, but it isn't available for R-3.4 or R-3.5.
I am running this code on Windows 7.
Any suggestions?

shiny example apps not running

I just installed shiny in RStudio and tried to run the example apps with runExample()
e.g. runExample("01_hello") but all I get as output is just the title, some input box and then the script code of the app.r, no plot though. In the console just a bunch of error messages:
Warning: Error in .Call: "_httpuv_decodeURIComponent" not available for .Call() for package "httpuv"
Stack trace (innermost first):
1: runApp
Can you see the problem from the picture?
Thanks a lot.
Thank you, #hpesoj626 the httpuv package was installed in my R version, indeed, it just needed an update. So I resolved the problem by updating the httpuv package. On a side note, I'm just wondering why having clicked the option "Install dependencies" (RStudio -> Tools -> Install packages...) does not include the newest versions (updated packages) of dependencies needed for the actual package to run correctly? How am I as a user supposed to know what packages (dependencies) that e.g. shiny needs to run, need an update? Anyway, thank you both again for your interest.

Error: could not find function "geom_sf"

I'm currently running R version 3.4.2 on Windows and have ggplot2 (via tidyverse) and sf package versions 3.4.2. I'm attempting to map spatial data using the ggplot2 sf kit.
When trying to run geom_sf, I receive an error: could not find function "geom_sf".
When I search the ggplot2 package using ls("package:ggplot2"), geom_sf is not listed in the library files.
I installed devtools and ran devtools::install_github("tidyverse/ggplot2"). However, I receive an error: Installation failed: Failed to connect to raw.githubusercontent.come port 443: Timed out. I assume the firewall at work is halting this connection.
To get around this, I tried downloading the zip manually from https://github.com/tidyverse/ggplot2 and running install.packages('ggplot2-master.zip', lib = 'C:/filepath') and receive the error: package 'ggplot2-master.zip' is not available (for R version 3.4.2). I was getting the same error before I updated from 3.4.1.
TLDR: I'm having the same issue as this user: Error when plotting sf object --- Error: could not find function "geom_sf"
but the solution does not work for me.
Does anyone see where I may be missing something? Or how to access this highly referenced (more streamlined) package?
If you downloaded from the URL you cited then the appropriate next step would be to execute this at the R session command line assuming your package is in the working directory:
install.packages('ggplot2', repo=NULL, lib = 'C:/filepath')
The .zip extension is implicit in trying to install from a binary windows file and you need to tell it NOT to attempt downloading from CRAN.

Unable to deploy Shiny application on Shiny Server in Linux VM

I have been trying to deploy my shiny application in shiny server which i have installed on Linux VM (RHEL 6.5, 64 bit) by following the instructions given in this site
The server is started successfully but i get the following when i try to access the sample application provided as a part of the shiny server.
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib64/R/library/Rcpp/libs/Rcpp.so':
/usr/lib64/R/library/Rcpp/libs/Rcpp.so: invalid ELF header
In addition: Warning message:
package ‘shiny’ was built under R version 3.3.0
Error: package or namespace load failed for ‘shiny’ Execution halted
I installed all the required packages without any error still i got this exception when i tried to access the sample application.
The following are the steps i followed to install shiny server.
Installed R. In my office EPEL repository is blocked since it is maintained by a third party organization. So I downloaded the rpm file for R from EPEL website and installed the same using the rpm command.
Next i downloaded the shiny package from the CRAN repository and installed the same using the following command
R CMD INSTALL shiny_0.13.2.tgz
Finally i downloaded and installed the shiny server RPM file.
The server was successfully installed and started without any errors, yet i get the above error when trying to access the application deployed in the server.
I googled a lot for this error but could not find much. Has anybody else faced this issue? Could someone help me out with this?
I found out the issue. I installed all the packages as root user but shiny server runs under a different username "shiny". In order to solve this I started an R session using the following command
sudo R
Then I installed the packages using their source, as my LINUX VM (office machine)did not have internet access. I used the following command for installing the packages from the source. First we need to untar the source and then run the following command.
require(devtools)
install('path-to-the-untared-folder')
The below link helped me in finding out the solution.
R - shiny server on Ubuntu

Installed package (Dygraphs) not detected by my Shiny Application (R)

I am facing a problem that you might already have seen : I am trying to create a Shiny app using dygraphs. But, for the first time, when I call the library(dygraphs), in my ui.R file, I get an error :
ERROR: there is no package called ‘dygraphs’
I checked whether it was correctly installed on my server :
installed.packages() gives me the line :
OS_type MD5sum NeedsCompilation Built
dygraphs NA NA "no" "3.2.1"
require(dygraphs) gives me :
Loading required package: dygraphs
I have the same version of R on my computer and my server, which is :
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
And, the weirdest thing : my code works on my computer (with runApp() on Rstudio), but not on my server.
If anyone know how to cope with this problem... Thanks a bunch !
I found the solution, it's possible to see the dependencies of a package with CRAN : https://cran.r-project.org/web/packages/dygraphs/index.html
And eventually, the following line does the trick !
install.packages(c("htmlwidgets","xts","zoo","rmarkdown","yaml","dygraphs"),lib="/usr/local/lib/R/site-library",dependencies=TRUE)
Enjoy :)

Resources