How to get help
By: Garrett Grolemund and Mine Cetinkaya-Rundel
Writing code can be tricky. Sometimes you will want more advice than you can find in R’s help pages.
This article will show you where to seek help, how to get it.
Support for R and Shiny has developed like the languages themselves, organically and through the excellent work of volunteers. You can be a part of this process. Simply ask your questions in the right places and in a clear manner. Not only will your question help you, it will create a record that will benefit everyone who has the same question later.
Where to seek help
You will get the quickest response if you submit your question to a place that people already visit to ask and answer similar questions. We recommend these resources for questions on the following topics:
- Shiny Server: The Shiny Server support forum
- Shiny Server Pro and RStudio Connect: email the Shiny Server Pro support team1
- ShinyApps.io: The ShinyApps.io discussion group
- RStudio IDE: The RStudio IDE support forum
1Since Shiny Server Pro and RStudio Connect are a paid products, they have a dedicated customer support team.
These sites all have archives that you can search to see if your question has already been answered. If answered, you can get an immediate solution!
Once answered your question will go into these archives and expand the knowledge base in the Shiny community.
How to get help
You will get the most useful help if you do these simple things:
- Search the archives and check if your question has an answer already.
- Write a minimal reproducible example that illustrates your problem.
- Be precise. Include the exact error messages that you see.
sessionInfo()in R and include the output with your question (
sessionInfo()displays the versions of R and its packages that you are using, as well as your OS. This is important information for debugging).
- Be friendly and appreciative.
These steps will make it easier for a mentor to help you.
How to write a good reproducible example
A reproducible example is a snippet of R code that someone can run and recreate your problem. Many bugs cannot be diagnosed unless you include the code that causes them.
A good reproducible example is:
- Minimal - It should contain just enough code to recreate the bug. This will help both you and your mentors zero in on the problem.
- Complete - It should contain everything a person needs to recreate the bug. In other words, a person should be able to copy and paste the code into R and see the bug.
You do not need to share your own code and data (if you do not want to). Often you can create an example that reproduces your bug with toy code and a dummy data set.
If you need to create a reproducible example of a Shiny app, we recommend you save your app as a gist. When you write your question, include the
runGist command that will launch your app. A
runGist command looks like this:
Don’t forget to explain how to create the error in your app. You may need to provide instructions such as “Click this checkbox” or “Select this value.”
If you need to create a reproducible example of Rcpp code, we recommend you supply a .cpp file that can be executed
Rcpp::sourceCpp. It is the easiest way of testing or
debugging C++ / Rcpp code.
If you want more details on writing a good example, Hadley gives some advice here.
What about the Shiny Dev Center?
RStudio wants to make the Shiny Dev Center as useful as possible. We hope it can be a one stop shop for advice, wisdom, and inspiration. However the Shiny Dev Center is not designed to be an interactive resource.
If you ask a question about an article or tutorial in its comments section, we will try our best to answer it there. However, the comments section is not a good place to ask for specific help with your code. Why not?
- Practicality - Volunteers do not hang out in the comments sections waiting to answer your questions.
- Efficiency - The resources listed above are searchable and well known, which makes it easy for others to benefit from your questions and answers. Not so for the comments.
- Redundancy - There is a good chance someone already answered your question at one of the help sites. Why not find out?
You can get the help you need and make Shiny better in the process by visiting a help site specific to your question. Do not forget to make your question clear with a reproducible example, an error message, and the output of
We love it when R users help each other, but RStudio does not monitor or answer the comments in this thread. If you'd like to get specific help, we recommend the RStudio Community as well as the Shiny Discussion Forum for in depth discussion of Shiny related questions and How to get help article for a list of the best ways to get help with R code.comments powered by Disqus