rstudio / rstudio/rmarkdown

How to know if rmarkdown runtime:shiny is being used or if inside a real Shiny app?

Open
#2,004 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question theme: shiny
Dominant language
R
Stars
3.1k
Forks
990
Avg merge
5h 43m
Merged PRs (30d)
11

Description

If I want to check whether the current shiny server code is being run inside an rmarkdown or inside a shiny application, what's the best way to do so?

This old issue has been closed https://github.com/rstudio/rmarkdown/issues/933 and the solution there does not seem to work anymore. Solutions from this SO thread are not helpful either.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the closed rstudio/rmarkdown issue 933 and the linked Stack Overflow discussion, then compare their detection approaches with the current runtime:shiny behavior described here. Determine whether a reliable distinction is possible and what project-facing change would make it usable; the issue is complete only when the approach is documented or implemented and verified for both rmarkdown and standalone Shiny apps.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.