Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install rmarkdown library #891

Closed
wants to merge 1 commit into from

Conversation

pablobernabeu
Copy link
Contributor

@pablobernabeu pablobernabeu commented May 9, 2020

Installing (at least trying to install) rmarkdown library (for background, see #799, as well as Section 3.2 at https://docs.rstudio.com/shiny-server/)

Hi all (esp. @choldgraf),

I've looked back into #799. To my joy, it turns out that Shiny Server already implemented a hierarchical logic whereby R Markdown scripts are sought after pure Shiny ones, as quoted below from RStudio.

3.2 R Markdown

In addition to serving traditional Shiny applications out of a directory (a server.R file and an associated UI), Shiny Server now supports interactive R Markdown documents. To take advantage of this capability, you will need to make sure that R Markdown is installed and available for all users. You can do so by running the following command:

sudo su - -c "R -e \"install.packages('rmarkdown')\""

If a hosted directory does not include a server.R file, Shiny Server will look to see if it contains any .Rmd files. If so, Shiny Server will host that directory in "R Markdown" mode using rmarkdown::run.

Particular Rmd files can be accessed by referencing their full path including the filename, e.g., http://myserver.org/mydocs/hello.Rmd. If a request is made to a directory rather than to a particular Rmd file, Shiny Server will attempt to serve the file index.Rmd. If that file does not exist, the user will get an error alerting them that the file is not available.

So, I've tried to install rmarkdown. I would be grateful for a review of this. If this is merged, I would then follow up whether the new feature works, by looking at the document mentioned in #799.

Thank you very much

…l as Section 3.2 at https://docs.rstudio.com/shiny-server/)

Installing (at least trying to install) `rmarkdown` library (for background, see jupyterhub#799, as well as Section 3.2 at https://docs.rstudio.com/shiny-server/)
@betatim
Copy link
Member

betatim commented May 10, 2020

Why does the rmarkdown package have to be installed by default/for everyone? Couldn't a repository that wants to use it install it via install.R or environment.yml?

@pablobernabeu
Copy link
Contributor Author

pablobernabeu commented May 10, 2020

I don't really know, unfortunately. I've asked in the RStudio Community.

In my experience, having the rmarkdown package in the install.R script isn't enough. My Binder repo is working well, apart from the Shiny environment.

@pablobernabeu
Copy link
Contributor Author

pablobernabeu commented Sep 10, 2020

Hi @choldgraf and @betatim,

This is working now! I think the tricks were including all the necessary packages in the install.R script, and naming the Rmd file as index.Rmd.

Thanks for your attention.

@pablobernabeu pablobernabeu deleted the patch-1 branch September 10, 2020 12:44
kaedonkers pushed a commit to informatics-lab/binder_rstudio_jupyterlab_example that referenced this pull request Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants