How to deploy a Shiny .Rmd file to shinyapps.io

Hi all,

I was able to previously deploy
the diamonds tutorial example files:
ui.R and server.R
to my shinyapps.io acct.
No problem!. That works!.

But now,
I'm trying to deploy a SHINY .RMD file
(created with the flexdashboard pkg),
to my shinyapps.io acct.

From this simple example in URL:

If I RUN this BMI.Rmd file locally in Rstudio,
it works great!.

Then to deploy to my shinyapps.io acct,
I click the ["Publish"] button
at the top-right of the locally running Shiny app.

A "Publish to Server" dialog box opens.

I enter: "BMI" as the Title.
Then I hit the [Publish] button
at the bottom of this dialog box.

The [Publish] button turns gray,
...and stays like that forever...
Nothing is deployed.

I must be missing something simple...
Help!

Rstudio 1.1.463 Linux

Long shot... Make sure the .Rmd is in it's own folder. RStudio IDE likes to believe it can upload anything in the same folder as the original document.

Thanks for the reply, Barret.

"...Make sure the .Rmd is in it's own folder...".
Do you mean that each .Rmd file should be:

(a) in a separate, unique Rstudio Project folder
(just by itself and for itself)?,
-or-
(b) simply located in a subfolder of an existing Project folder
(along with other regular R and data files)?.

Thanks! (sorry for the simple, conceptual question...).

For any Rmd that I deploy, I try to make sure it's in its own folder containing only the files necessary to produce the final output.

So, option (b).


Situation:

I download a .Rmd into my ~/Downloads folder: ~/Downloads/someFile.Rmd. My ~/Downloads folder will also contain many other files. When trying to deploy ~/Downloads/someFile.Rmd, I've seen RStudio IDE not like that. If I move the file to ~/Downloads/subfolder/someFile.Rmd where there are no other unnecessary files and try to deploy it, the IDE is snappy and it deploys great.

1 Like

Thanks
for the very clear explanation, Barret.

Will follow your guideline.

Have a great R day!.
SFdude

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.