Skip to content

Commit

Permalink
fixed example files. Still need to fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
jrob95 committed Dec 10, 2024
1 parent 2eaeb9e commit 2a3bf86
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions inst/extdata/labelled.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ID,upset,scare,overp,leave,leada,awake
1,All the time,All the time,All the time,"Very, very worried","Very, very worried",All the time
2,Most of the time,Most of the time,Most of the time,Very worried,Very worried,Most of the time
3,Quite often,Quite often,Quite often,Fairly worried,Fairly worried,Quite often
4,Some of the time,Some of the time,Some of the time,Somewhat worried,Somewhat worried,Some of the time
5,Once in a while,Once in a while,Once in a while,A little worried,A little worried,Once in a while
6,Hardly any of the time,Hardly any of the time,Hardly any of the time,Hardly worried,Hardly worried,Hardly any of the time
7,None of the time,None of the time,None of the time,Not worried,Not worried,None of the time
1,All the time,All the time,All the time,"Very, very worried/ concerned","Very, very worried/ concerned",All the time
2,Most of the time,Most of the time,Most of the time,Very worried/ concerned,Very worried/ concerned,Most of the time
3,Quite often,Quite often,Quite often,Fairly worried/ concerned,Fairly worried/ concerned,Quite often
4,Some of the time,Some of the time,Some of the time,Somewhat worried/ concerned,Somewhat worried/ concerned,Some of the time
5,Once in a while,Once in a while,Once in a while,A little worried/ concerned,A little worried/ concerned,Once in a while
6,Hardly any of the time,Hardly any of the time,Hardly any of the time,Hardly worried/ concerned,Hardly worried/ concerned,Hardly any of the time
7,None of the time,None of the time,None of the time,Not worried/ concerned,Not worried/ concerned,None of the time
Binary file modified inst/extdata/labelled.xlsx
Binary file not shown.
13 changes: 7 additions & 6 deletions inst/shiny-apps/pcqol_utilities_app/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ shiny::shinyServer(function(input, output, session) {
}

# Preprocess uploaded data to convert text labels to numeric values
processed_data <- preprocess_data(uploaded_data)
processed_data <- pcqol_preprocess_labels(uploaded_data)
data_reactive(processed_data)
})

Expand Down Expand Up @@ -65,28 +65,29 @@ shiny::shinyServer(function(input, output, session) {
output$download_labelled_xlsx <- shiny::downloadHandler(
filename = function() { "labelled.xlsx" },
content = function(file) {
file.copy("www/labelled.xlsx", file)
}
file.copy("https://github.com/jrob95/pcqolutilities/blob/main/inst/extdata//labelled.xlsx", file)
},
contentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
)

output$download_labelled_csv <- shiny::downloadHandler(
filename = function() { "labelled.csv" },
content = function(file) {
file.copy("www/labelled.csv", file)
file.copy("https://github.com/jrob95/pcqolutilities/blob/main/inst/extdata//labelled.csv", file)
}
)

output$download_unlabelled_xlsx <- shiny::downloadHandler(
filename = function() { "unlabelled.xlsx" },
content = function(file) {
file.copy("www/unlabelled.xlsx", file)
file.copy("https://github.com/jrob95/pcqolutilities/blob/main/inst/extdata//unlabelled.xlsx", file)
}
)

output$download_unlabelled_csv <- shiny::downloadHandler(
filename = function() { "unlabelled.csv" },
content = function(file) {
file.copy("www/unlabelled.csv", file)
file.copy("https://github.com/jrob95/pcqolutilities/blob/main/inst/extdata//unlabelled.csv", file)
}
)
})

0 comments on commit 2a3bf86

Please sign in to comment.