I want to deploy a shiny app but i am getting this error.
Error in lint(appDir, appFiles, appPrimaryDoc) :
Cancelling deployment: invalid project layout.
The project should have one of the following layouts:
'server.R' and 'ui.R' in the application base directory,
'server.R' and 'www/index.html' in the application base directory,
'app.R' or a single-file Shiny .R file,
An R Markdown (.Rmd) or Quarto (.qmd) document,
A static HTML (.html) or PDF (.pdf) document.
'plumber.R' API description .R file
'entrypoint.R' plumber startup script
A tensorflow saved model
rsconnect::deployApp('Shared/Thomas/thomaps')
thomaps has an r script and a data folder with one excel sheet in it.
Related
First of all I set my working directory as following
setwd("C:/Users/asus/Desktop/App-1")
Then I can call the app with the following code:
runApp("C:/Users/asus/Desktop/App-1")
But I cannot call the app via :
runApp("App-1")
The script in the directory is named as "app.R" but it appears in the directory as "app".
Whereas, in the R webpage it says if I create a new directory named App-1 it should have worked. But It does not. Many thanks.
I would like to upload an html file automatically to a ftp server once it has been knitted.
I added this code to my rmd file:
RCurl::ftpUpload(here::here("rmd", "final.html"), Sys.getenv("MY_FTP_DETAILS"))
Obviously, there is an error since the HTML file hasnĀ“t been created yet.
Do you know of any work-around to get this file uploaded when the knitting process has been finalized?
Could you just use setwd(FTP server folder path) for the current project, and then have the knitted document saved to the current directory, which is the FTP server...
what do you get if you do
RCurl::ftpUpload("path/to/file/final.html"), Sys.getenv("MY_FTP_DETAILS"))
I am trying to publish R shiny app.But it is giving error that path should be to files within the project directory.
This is for R shiny .I have designed an app where I need to read csv files to it.App is running properly. But, when I am trying to publish it shinyappp server.It is throwing error that path to files should be within the project directory.
I am getting error that paths should to files within the project directory.
I have an interactive knitr/rmarkdown doc that uses shiny apps.
I want to place the .Rmd file on either my personal site or GitHub.
How would I be able to remotely run this file directly from online?
For example, when I run the Rmd file from my local machine, I use
rmarkdown::run("./IntroToShinyWorkshop.Rmd")
But when I try to run a file form online I get an error that the path doesn't exist (w/ one of the issues being that it merges the url with my wd).
run("IntroToShinyWorkshop.Rmd",dir = "https://raw.githubusercontent.com/theforestecologist/ShinyWorkshop/master/")
Error in run("https://raw.githubusercontent.com/theforestecologist/ShinyWorkshop/master/IntroToShinyWorkshop.Rmd") :
The directory 'C:/Users/theforestecologist/Documents/https:/raw.githubusercontent.com/theforestecologist/ShinyWorkshop/master' does not exist
In addition: Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="https://raw.githubusercontent.com/theforestecologist/ShinyWorkshop/master": The filename, directory name, or volume label syntax is incorrect
Related: Once I do figure out how to run a file from an online repo, I'm also interested in how to change the working directory to that url so that I can utilize other files there.
For example, I have a wrapper function (.R file) I can source that will call my .Rmd file (instead of running the Rmd file directly) -- however, I get the error that I cannot change the wd in my wrapper function to access the .Rmd file online.
I followed the same commands shown in shinyapps.io for uploading my app but I get the following error:
> library(shinyapps)
> shinyapps::deployApp("/Users/mona/CS764/demo")
Error in lint(appDir) : Cancelling deployment: invalid project layout.
The project should have one of the following layouts:
1. 'shiny.R' and 'ui.R' in the application base directory,
2. 'shiny.R' and 'www/index.html' in the application base directory,
3. An R Markdown (.Rmd) document.
Here's the structure of my files:
When using deployApp() you must deploy the directory containing your ui.R and server.R files (or shiny.R / www/index.html if using a custom UI). The files can not be a subdirectory.
Additionally, its important to note that any R files in the directory or any subdirectory will be parsed, so its important that they have valid syntax.