Deploying a Shiny app using a self-written package

I want to deploy a shiny app on shinyapps.io. My app use a package I made, but I cant deploy the app because it doesn't know my package on CRAN. I know we can use github with devtools so I tried like this :

 devtools::install_github("zertupo/NxT/tree/master/NxT")
library(NxT)

I have the same problem...If I writte without library(NxT), it's working, but the app doesn't work on the web because it doesn't know the function from the package...
The log give me this

Downloading GitHub repo zertupo/NxT@master
2018-05-15T14:49:06.269928+00:00 shinyapps[343120]: from URL https://api.github.com/repos/zertupo/NxT/zipball/master
2018-05-15T14:49:06.538353+00:00 shinyapps[343120]: 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 weel a package with a DESCRIPTION file...and obviously the function is not found, the package is not loaded...

Anyone could help me ?

Were you able to solve this?

Running into a similar issue with my self-made library. Mine is not on github but located in the folder with my app that I am trying to deploy.

devtools::install(file.path(getwd(),'MyPackage') )
library(MyPackage)

# results in this:
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "N:/Research/myapp/MyPackage" --library="C:/Users/myname/Documents/R/win-library/3.5"  \
  --install-tests
#more code on the package install.... 

#running the app 
runApp('N:/Research/myapp/myapp')

Preparing to deploy application...DONE
Uploading bundle for application: 396647...Error in yaml::yaml.load(string, ...) : 
  Parser error: while parsing a block mapping at line 1, column 1 did not find expected key at line 4, column 41
Calls: <Anonymous> ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

My R library is stored as MyPackage_0.10.3.tar.gz with the DESCRIPTION, INDEX,LICENSE,NAMESPACE files as well as several folders (data,doc,html,help,etc). Looks like the library is still downloading locally...? Installing the package and working locally works fine.

Try installing without "/tree/master/" in the path.
If you need the sub-directory, specify it like "zertupo/NxT/NxT".
"master" is the default branch.

shinyapps.io supports packages CRAN, Bioconductor, and GitHub, per Using your R packages in the cloud.

The rsconnect package captures the package names and versions in a manifest file that is uploaded to shinyapps.io. It does not bundle the actual local packages themselves.

1 Like

I solved it... I just put

require(NxT)

In my app before the ShinyServer... And I put my package on my github folder...

1 Like