deploy shiny app with package self written - r

First I know there is a question which looks like to mine here :
Deploying a Shiny app using a self-written package
But there is not an answer at my question, so I ask again with my specificity.
I made a package what I want use in a shiny app. On the computer it's working, but when I want to upload the app on shinyapps.io to share it, the uploading doesn't work... I tried to put the package in directory of the shiny app and to upload it too, but the same result results.
My problem is to upload the shiny app with my package.
When I upload my shinyapps with my package I get this :
devtools::install_github("zertupo/NxT")
library(NxT)
Erreur : Unable to retrieve package records for the following
packages:
- "NxT" De plus : Warning message: In FUN(X[[i]], ...) : Failed to infer source for package 'NxT'; using latest available version on CRAN
instead
With only the devtools without the call to package :
devtools::install_github("zertupo/NxT")
I get this on shinyapps.io :
An error has occurred. Check your logs or contact the app author for
clarification.
and the logs give me :
Installation failed: Does not appear to be an R package (no DESCRIPTION)
2018-05-15T14:49:06.583190+00:00 shinyapps[343120]: Warning: Error in next_word: could not find function "next_word"
It's well a package, it works on my computer and he has a DESCRIPTION file...And so without the call to package, it doesn't find the function... I don't know how to proceed to make it work, I searched about the description file but it is in and it is good.

Related

Shiny-logs-error-there is no package called 'tidyverse'

I used shiny output in rmarkdown to create an interactive document and was able to see local html file but when trying to publish it to shinyapps.io, I get an error message:
Error: An error has occurred. Check your logs or contact the app author for clarification.
I checked the logs in the shinyapps.io, I see the following error:
Warning: there is no package called "tidyverse"
Please help me with resolving this issue so that I can create an interactive document with shiny+rmarkdown
Thanks,
Venkat

Error: package or namespace load failed for �shiny�: When Deploying Shiny App

I am trying to deploy a shiny app onto shinyapps.io but I get the following output in Deploy tab:
Error: package or namespace load failed for �shiny�:
.onLoad failed in loadNamespace() for 'shiny', details:
call: .Call("_httpuv_getRNGState", PACKAGE = "httpuv")
error: "_httpuv_getRNGState" not available for .Call() for package "httpuv"
Error: loading failed
Execution halted
The app I am trying to deploy is the template/draft app you get when you start a new shiny web app file from RStudio. At first I thought the cause of the error might be something in my original apps that I tried to upload.
Would anyone be able to assist in fixing or at least explaining what might be causing the error.
I don't have enough reputation points to just leave a comment, but if you search Google for your error lots of information comes up (i.e. here or here). It appears to be either an error with the install of httpuv or one of the packages it is linked to (such as Rcpp or later), so update those packages and see if that works.

Error uploading ShinyApp when using Highcharter

I've created a Shiny dashboard which is using Highcharter. When I try to upload it to the Shiny Server I get this error:
"Warning: Error in dyn.load: unable to load shared object '/usr/local/lib/R/site-library/igraph/libs/igraph.so': libglpk.so.36: cannot open shared object file: No such file or directory"
The iGraph dependency for Highcharter should automatically install itself, so not sure what the problem is. I've also tried referencing iGraph in the library() call.
Has anyone run into this problem before?
Make sure the package is installed on the instance of Shiny Server. The Library() function does not install missing packages, install.packages() does this. But you would not want to have install.packages() directly in your code since it will attempt to install the package for each session (unless you placed it in an if{} statement that first checked the availability of the package).

R - trouble loading "forecast" package

When trying to load the "forecast" package in R using
library(forecast)
I get the pop-up error message: "The procedure entry point IdnToAscii could not be located in the dynamic link library KERNEL32.dll".
This is then followed by an error message in the console: "unable to load shared object 'C:/Documents and Settings/hq/My Documents/R/win-library/3.3/curl/libs/i386/curl.dll':
LoadLibrary failure: The specified procedure could not be found."
From the research I've done on this, it looks as though this problem is occurring because R is having difficulty with that specific library location. So I've re-installed "forecast", using a different location:
library(forecast,lib.loc="C:/Documents and Settings/hq/Desktop/RDirectory/New Library")
I have checked, and the files are now in that second location. However, when I do:
library(forecast,lib.loc="C:/Documents and Settings/hq/Desktop/RDirectory/New Library")
I get the same pop-up error message, followed by the same error message in the console: "Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Documents and Settings/hq/My Documents/R/win-library/3.3/curl/libs/i386/curl.dll':". This suggests that R is ignoring my instruction to look in a different library location, and going back to the same location.
Apologies - I'm sure this is a very basic question, but I've never used R before.
Update - I wanted to check that this wasn't a generic problem with downloading packages from R, so I have installed another package (e1071) at random and run a random function from that package (the "naiveBayes" function), and this installed, loaded and ran perfectly. This suggests that this is perhaps something to do with the installation of this specific package.
Update 2 - just changed the library location. Made absolutely no difference. I am using Windows XP and R version 3.3.0, if either of these is relevant...

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