# remotes::install_github("surveydown-dev/surveydown", force = TRUE)library(surveydown)# Database setup# surveydown stores data on a database that you define at https://supabase.com/# To connect to a database, update the sd_database() function with details# from your supabase database. For this demo, we set ignore = TRUE, which will# ignore the settings and won't attempt to connect to the database. This is# helpful for local testing if you don't want to record testing data in the# database table. See the documentation for details:# https://surveydown.org/store-datadb <-sd_database(host ="aws-0-us-west-1.pooler.supabase.com", dbname ="postgres",port ="6543",user ="postgres.yppmohklyshsiwkpadqa", table ="Woody",# ignore = TRUE )# Server setupserver <-function(input, output, session) {# Define any conditional skip logic here (skip to page if a condition is true)sd_skip_if()# Define any conditional display logic here (show a question if a condition is true)sd_show_if()# Database designation and other settingssd_server(db = db )}# shinyApp() initiates your app - don't change itshiny::shinyApp(ui =sd_ui(), server = server)# viola
1
The name you choose here will appear as a database table on the Supabase site – data itself is exportable as .csv or .sql.
data <-read.csv("Woody.csv")descr::freq(data$einstein)
data$einstein
Frequency Percent
7 53.85
2 2 15.38
lemon_posicle 4 30.77
Total 13 100.00