# install.packages('devtools')
devtools::install(force = TRUE)
Frequently Asked Questions
Have a question but don’t see an answer here? Feel free to make a post on GitHub:
- Post a bug report or documentation issue on the GitHub repo issues page.
- Ask a question, make a feature request, start a discussion, or show off your project on the discussion board.
Is surveydown right for me?
surveydown might be a good fit for you today if…
- you are comfortable using Quarto for rendering markdown into html outputs and for basic coding (you certainly don’t need to be an R “expert” to use surveydown!)
- you are frustrated with alternative survey platforms that require expensive licenses or have limited features.
- you want to collaborate on surveys with others using reproducible tools like Git.
- you don’t mind using a project that is not fully polished or finished.
surveydown might not be a good fit for you today if…
- you need stable, polished software that is mature and completely bug-free.
- you need a product with a guaranteed security level, such as HIPAA compliance (see our security page for more details).
- you prefer a platform that uses a graphic interface to define survey content.
Why is my survey app so slow when starting?
When a {surveydown} survey first runs, it checks for files in a _survey
folder that contain the rendered content from your survey.qmd
file. If any of those files are missing or if changes have been detected in your survey.qmd
or app.R
files, it will re-render your survey, which can take a bit longer. But this only happens once, and afterwards so long as no further changes have been made to your survey files the app will use the saved content in the _survey
folder to launch, which should load almost instantly. So if your app launches slowly, just close it and launch it again and you should immediately load. If you still see a slow launch, consider posting an issue to let us know that something might be wrong.
Also, it is important that you run your survey locally at least once before deploying it live. This will render all your survey content into the _survey
folder, which will also get uploaded when you deploy it.
How do I make a question required?
Use the required_questions
argument in sd_server()
to control required responses (see the required questions page for more details).
Why is my shinyapps deployment failing?
First, make sure everything is correctly defined, including your Supabase project settings and password settings. The password in your project folder should be the same as your Supabase project password (see here for how to set the password). Then, make sure your survey runs on your local machine and can successfully link with your Supabase project table. With these confirmed, your shinyapps deployment should work without problem.
If you still encounter an error (e.g., the page shows the app failed to start, or you see the page but it doesn’t run properly), try clearing your cache. The simplest way to do so is to reboot your computer. It may also help if you delete previously generated files, such as the survey.html
file if you rendered it and the rsconnect
folder. After re-rendering, you should be able to deploy the app without error.
How should I install the {surveydown} package?
You can install the {surveydown} package from CRAN or the GitHub repo of the package source code. Follow these instructions for either approach.
Sometimes neither of these approaches work, often because your path is managed by some package managing system like Anaconda. In this case, a third alternative is to download the zip file of the package source code and then install it locally.
To download the zip file, go the the surveydown repo, click on the green “Code” button and click on “Download Zip”, or simplify click on this link.
Unzip this repo, then open the surveydown.Rproj
file. In your R Console panel, run this code to install:
How should I set a password for my surveydown project / why can’t I see my password?
With Supabase (the database we use to store survey responses), you need a password to access the database (see the Password page for details).
To connect to this database in a {surveydown} survey, you have to locally store this password in a secure location by running this function in your console:
sd_set_password("MyPassword")
This will store your password in a local .Renviron
file and will look like this if you open it:
SURVEYDOWN_PASSWORD=MyPassword
DO NOT edit this file. The {surveydown} package will search for it to find your Supabase password.
Also, you will need to restart your R session after running sd_set_password()
. This is because the .Renviron
file gets read when the R session launches, so if you create or modify your password using sd_set_password()
, you will need to restart your R session for R to be able to “see” the .Renviron
file containing your password.
There is no defined sequence in setting your password on Supabase or for {surveydown} - you can define your Supabase project password first and then define your local password using sd_set_password()
, or you can do it in the opposite order. The only thing that matters is when you attempt to connect to Supabase using your survey, these 2 passwords should match.