Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding phevaluator and datasources modules to develop. Also improving tests and components module. #190

Merged
merged 28 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c30d58b
Add tests for phevaluator main module
nhall6 May 16, 2023
4c325de
updates
nhall6 May 16, 2023
39210f3
Updating argument names passed to phevlauatorServer
nhall6 May 16, 2023
dc42b63
cleaning
nhall6 May 16, 2023
956fc55
updating json to have correctly named colDefs in list, updating scrip…
nhall6 May 17, 2023
75dc240
updating phevaluator module and adding datasources module skeleton
nhall6 May 23, 2023
fe720a0
Update datasources-main.R
nhall6 May 23, 2023
885b6d0
Update NAMESPACE
nhall6 May 23, 2023
caac60a
oxygenizing datasources and removing old phevaluator rds
nhall6 May 23, 2023
795058c
further correctly oxygenizing
nhall6 May 23, 2023
8fc059b
updating phevaluator and components
nhall6 May 31, 2023
aba8fb5
updating data pulls, filtering, download file names, and general func…
nhall6 Jun 2, 2023
80d10b8
fixing connectionHandler typos
nhall6 Jun 2, 2023
5e44dfc
updating datasources main and finishing data pull helper function for…
nhall6 Jun 7, 2023
1d1d629
getting datasources up and working
nhall6 Jun 8, 2023
a0f8a0b
fixing error in cohort generator helper, creating PV and DS databases…
nhall6 Jun 13, 2023
d9931cb
updating components, phevaluator, and fixing some tests
nhall6 Jun 15, 2023
277a230
fixing tests and errors running checks, and updating datasources colDefs
nhall6 Jun 19, 2023
21f733f
fixed warnings and notes
nhall6 Jun 21, 2023
6baa2dd
Merge pull request #189 from OHDSI/main
nhall6 Jun 22, 2023
8679fb0
Merge branch 'develop' into phevaluator
nhall6 Jun 23, 2023
192de0e
fixing tests again
nhall6 Jun 23, 2023
b04c187
Merge branch 'phevaluator' of https://github.com/OHDSI/OhdsiShinyModu…
nhall6 Jun 23, 2023
a94c8be
fixing tests
nhall6 Jun 23, 2023
026c2d9
fixing tests cg again
nhall6 Jun 23, 2023
b558c27
updating phevaluator data model, adding a table, and uploading new sq…
nhall6 Jun 23, 2023
0733167
updating pheval data pulls
nhall6 Jun 23, 2023
95be4fe
changing code to create PV DB and uploading new sqlite file
nhall6 Jun 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.RData
.Ruserdata
/.idea/
rsconnect/rconnect.jnj.com/NHall6/phevaluator_v01.dcf
errorReportSql.txt
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Imports:
shinydashboard,
shinyWidgets,
SqlRender,
stringi,
stringr,
tibble,
tidyr,
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export(cohortOverlapView)
export(compareCohortCharacterizationView)
export(conceptsInDataSourceView)
export(createCdDatabaseDataSource)
export(createCustomColDefList)
export(dataDiagnosticDrillServer)
export(dataDiagnosticDrillViewer)
export(dataDiagnosticHelperFile)
Expand All @@ -24,6 +25,9 @@ export(dataDiagnosticSummaryServer)
export(dataDiagnosticSummaryViewer)
export(dataDiagnosticViewer)
export(databaseInformationView)
export(datasourcesHelperFile)
export(datasourcesServer)
export(datasourcesViewer)
export(descriptionAggregateFeaturesServer)
export(descriptionAggregateFeaturesViewer)
export(descriptionDechallengeRechallengeServer)
Expand Down Expand Up @@ -72,6 +76,7 @@ export(getLogoImage)
export(incidenceRatesView)
export(inclusionRulesView)
export(indexEventBreakdownView)
export(makeButtonLabel)
export(orpahanConceptsView)
export(phevaluatorHelperFile)
export(phevaluatorServer)
Expand Down Expand Up @@ -99,6 +104,8 @@ export(predictionSettingsViewer)
export(predictionValidationServer)
export(predictionValidationViewer)
export(predictionViewer)
export(resultTableServer)
export(resultTableViewer)
export(sccsDiagnosticsSummaryServer)
export(sccsDiagnosticsSummaryViewer)
export(sccsHelperFile)
Expand Down
6 changes: 3 additions & 3 deletions R/cohort-generator-main.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@

format_yesorno <- function(value) {
# Render as an X mark or check mark
if (value == "COMPLETE") "\u2714\ufe0f Yes" #if generation complete then green check mark with "yes"

Check warning on line 229 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L229

Added line #L229 was not covered by tests
else "\u274c No" #if not then red x with "no"
}

Expand Down Expand Up @@ -427,21 +427,21 @@
# download buttons - counts
output$downloadCohortCountsFull <- shiny::downloadHandler(
filename = function() {
paste('cohort-count-data-full', Sys.Date(), '.csv', sep='')

Check warning on line 430 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L430

Added line #L430 was not covered by tests
},
content = function(con) {
utils::write.csv(getCohortGeneratorCohortCounts(
connectionHandler = connectionHandler,
resultsSchema = resultsSchema,
tablePrefix = resultDatabaseSettings$tablePrefix,
databaseTable = resultDatabaseSettings$databaseTable,
databaseTablePrefix = resultDatabaseSettings$databaseTablePrefix

Check warning on line 438 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L433-L438

Added lines #L433 - L438 were not covered by tests
) %>%
dplyr::select("cdmSourceName",
"cohortId",
"cohortName",
"cohortSubjects",
"cohortEntries"), con)

Check warning on line 444 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L440-L444

Added lines #L440 - L444 were not covered by tests
}
)

Expand Down Expand Up @@ -505,7 +505,7 @@
"Generation Start Time",
"The time and date the cohort started generating"
),
format = reactable::colFormat(datetime = TRUE
format = reactable::colFormat(suffix = " mins"
)),
endTime = reactable::colDef(
header = withTooltip(
Expand Down Expand Up @@ -533,19 +533,19 @@
# download button - generation
output$downloadCohortGeneration <- shiny::downloadHandler(
filename = function() {
paste('cohort-generation-data-', Sys.Date(), '.csv', sep='')

Check warning on line 536 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L536

Added line #L536 was not covered by tests
},
content = function(con) {
utils::write.csv(getCohortGeneratorCohortMeta(
connectionHandler = connectionHandler,
resultsSchema = resultsSchema,
tablePrefix = resultDatabaseSettings$tablePrefix

Check warning on line 542 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L539-L542

Added lines #L539 - L542 were not covered by tests
) %>%
dplyr::select("cohortId",
"cohortName",
"generationStatus",
"startTime",
"endTime"), con)

Check warning on line 548 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L544-L548

Added lines #L544 - L548 were not covered by tests
}
)

Expand Down Expand Up @@ -574,8 +574,8 @@
cohortNames <- unique(inputVals$cohortName)
databaseIds <- unique(inputVals$cdmSourceName)
inputValsClean <- dplyr::ungroup(inputVals) %>%
dplyr::mutate(modeId = dplyr::case_when(
modeId==1 ~ "Subject",
dplyr::mutate('modeId' = dplyr::case_when(
.data$modeId==1 ~ "Subject",
TRUE ~ "Record"
)
)
Expand Down Expand Up @@ -645,32 +645,32 @@
# return(invisible(NULL))
# }

selectedInputs(
shinydashboard::box(
status = 'warning',
width = "100%",
title = 'Selected:',
collapsible = T,
collapsed = F,
shiny::div(
shiny::fluidRow(
shiny::column(
width = 8,
shiny::tags$b("Cohort:"),

Check warning on line 659 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L648-L659

Added lines #L648 - L659 were not covered by tests
#unique(inputVals$cohortName[inputVals$cohortName %in% input$selectedCohortName])
input$selectedCohortName

Check warning on line 661 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L661

Added line #L661 was not covered by tests
),
shiny::column(
width = 4,
shiny::tags$b("Database:"),

Check warning on line 665 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L663-L665

Added lines #L663 - L665 were not covered by tests
#unique(inputVals$cdmSourceName[inputVals$cdmSourceName == input$selectedDatabaseId])
input$selectedDatabaseId

Check warning on line 667 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L667

Added line #L667 was not covered by tests
),
shiny::column(
width = 4,
shiny::tags$b("Level:"),

Check warning on line 671 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L669-L671

Added lines #L669 - L671 were not covered by tests
#unique(inputValsClean$modeId)[inputValsClean$modeId == input$selectedModeId]
input$selectedModeId

Check warning on line 673 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L673

Added line #L673 was not covered by tests
)
)
)
Expand All @@ -678,102 +678,102 @@
)


data <- inputValsClean %>%
dplyr::filter(cdmSourceName %in% input$selectedDatabaseId &
cohortName %in% input$selectedCohortName &
modeId %in% input$selectedModeId

Check warning on line 684 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L681-L684

Added lines #L681 - L684 were not covered by tests
)

reactiveData <- shiny::reactive(data)

Check warning on line 687 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L687

Added line #L687 was not covered by tests

if(!is.null(data)){

Check warning on line 689 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L689

Added line #L689 was not covered by tests

output$attritionTable <- reactable::renderReactable(
reactable::reactable(
data = reactiveData() %>%
dplyr::select(c("cdmSourceName", "cohortName", "ruleName",
"personCount", "dropCount",
"dropPerc", "retainPerc")

Check warning on line 696 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L691-L696

Added lines #L691 - L696 were not covered by tests
)

,
rownames = FALSE,
defaultPageSize = 5,
showPageSizeOptions = T,
striped = T,
columns = list(
cdmSourceName = reactable::colDef(
filterable = TRUE,
header = withTooltip(
"Database Name",
"The name of the database"

Check warning on line 709 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L700-L709

Added lines #L700 - L709 were not covered by tests
)),
cohortName = reactable::colDef(
filterable = TRUE,
header = withTooltip(
"Cohort Name",
"The name of the cohort"

Check warning on line 715 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L711-L715

Added lines #L711 - L715 were not covered by tests
)),
ruleName = reactable::colDef(
header = withTooltip(
"Inclusion Rule Name",
"The name of the inclusion rule"

Check warning on line 720 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L717-L720

Added lines #L717 - L720 were not covered by tests
)),
personCount = reactable::colDef(
format = reactable::colFormat(separators = TRUE),
header = withTooltip(
"Subject/Record Count",
"The number of subjects or records (depending on your selection) remaining after the inclusion rule was applied"

Check warning on line 726 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L722-L726

Added lines #L722 - L726 were not covered by tests
)),
dropCount = reactable::colDef(
format = reactable::colFormat(separators = TRUE),
header = withTooltip(
"Number Lost",
"The number of subjects or records (depending on your selection) removed/lost after the inclusion rule was applied"

Check warning on line 732 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L728-L732

Added lines #L728 - L732 were not covered by tests
)),
dropPerc = reactable::colDef(
format = reactable::colFormat(separators = TRUE),
header = withTooltip(
"Percentage Lost",
"The percentage of subjects or records (depending on your selection) removed/lost after the inclusion rule was applied compared to the previous rule count"

Check warning on line 738 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L734-L738

Added lines #L734 - L738 were not covered by tests
)),
retainPerc = reactable::colDef(
format = reactable::colFormat(separators = TRUE),
header = withTooltip(
"Number Retained",
"The number of subjects or records (depending on your selection) retained after the inclusion rule was applied compared to the previous rule count"

Check warning on line 744 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L740-L744

Added lines #L740 - L744 were not covered by tests
))
),

filterable = TRUE,
sortable = TRUE,
defaultColDef = reactable::colDef(
align = "left"

Check warning on line 751 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L748-L751

Added lines #L748 - L751 were not covered by tests
)
)
)

#attrition plot
output$attritionPlot <- plotly::renderPlotly(
getCohortAttritionPlot(
data

Check warning on line 759 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L757-L759

Added lines #L757 - L759 were not covered by tests
)
)

# download button
output$downloadAttritionTable <- shiny::downloadHandler(
filename = function() {
paste('cohort-attrition-data-', Sys.Date(), '.csv', sep='')

Check warning on line 766 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L764-L766

Added lines #L764 - L766 were not covered by tests
},
content = function(con) {
utils::write.csv(data()
, con)

Check warning on line 770 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L768-L770

Added lines #L768 - L770 were not covered by tests
}
)
}

else{
shiny::showNotification('data NULL')

Check warning on line 776 in R/cohort-generator-main.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-generator-main.R#L776

Added line #L776 was not covered by tests
}

}
Expand Down
140 changes: 28 additions & 112 deletions R/components-data-viewer.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
#' Result Table Viewer
#'
#' @param id string
#' @param downloadedFileName string, desired name of downloaded data file. can use the name from the module that is being used
#'
#' @return shiny module UI
#' @export
#'
resultTableViewer <- function(id = "result-table") {
resultTableViewer <- function(id = "result-table",
downloadedFileName = NULL) {
ns <- shiny::NS(id)
shiny::div(# UI
shinydashboard::box(
Expand Down Expand Up @@ -41,6 +43,7 @@
"Reactable.downloadDataCSV('",
ns('resultData'),
"', 'result-data-filtered-",
downloadedFileName,
Sys.Date(),
".csv')"
)
Expand Down Expand Up @@ -76,133 +79,43 @@
# )





create_colDefs_list <- function(df, customColDefs = NULL) {
# Get the column names of the input data frame
col_names <- colnames(df)

Check warning on line 84 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L84

Added line #L84 was not covered by tests

# Create an empty list to store the colDefs
colDefs_list <- vector("list", length = length(col_names))
names(colDefs_list) <- col_names

Check warning on line 88 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L87-L88

Added lines #L87 - L88 were not covered by tests

# Define custom colDefs for each column if provided
if (!is.null(customColDefs)) {
for (col in seq_along(col_names)) {
if (col_names[col] %in% names(customColDefs)) {
colDefs_list[[col]] <- customColDefs[[col_names[col]]]

Check warning on line 94 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L91-L94

Added lines #L91 - L94 were not covered by tests
} else {
colDefs_list[[col]] <- reactable::colDef(name = col_names[col])

Check warning on line 96 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L96

Added line #L96 was not covered by tests
}

if (!is.null(customColDefs[[col_names[col]]]$header)) {
colDefs_list[[col]]$header <- customColDefs[[col_names[col]]]$header

Check warning on line 100 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L99-L100

Added lines #L99 - L100 were not covered by tests
}

if (!is.null(customColDefs[[col_names[col]]]$tooltip)) {
colDefs_list[[col]]$header <-
withTooltip(colDefs_list[[col]]$header, customColDefs[[col_names[col]]]$tooltip)

Check warning on line 105 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L103-L105

Added lines #L103 - L105 were not covered by tests
}
}
} else {
# Define default colDefs if customColDefs is not provided
for (col in seq_along(col_names)) {
colDefs_list[[col]] <- reactable::colDef(name = col_names[col])

Check warning on line 111 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L110-L111

Added lines #L110 - L111 were not covered by tests
}
}

# Return the list of colDefs
return(colDefs_list)

Check warning on line 116 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L116

Added line #L116 was not covered by tests
}

# Function to check if a column is formatted like a JSON file
# is_JSON_column <- function(column) {
# all(sapply(column, function(value) {
# suppressWarnings(jsonlite::fromJSON(value))
# !is.null(jsonlite::validate(value))
# }))
# }
#
# downloadJSON <- function(jsonData) {
# json <- jsonlite::fromJSON(jsonData)
# filename <- paste0("data-", Sys.Date(), ".json")
# jsonlite::write_json(json, file = filename)
# shiny::downloadHandler(
# filename = filename,
# content = function(file) {
# file.copy(filename, file)
# },
# contentType = "application/json"
# )
# }

# create_colDefs_list <- function(df, customColDefs = NULL) {
# # Get the column names of the input data frame
# col_names <- colnames(df)
#
# # Create an empty list to store the colDefs
# colDefs_list <- vector("list", length = length(col_names))
# names(colDefs_list) <- col_names
#
# # Define custom colDefs for each column if provided
# if (!is.null(customColDefs)) {
# for (col in seq_along(col_names)) {
# if (col_names[col] %in% names(customColDefs)) {
# colDefs_list[[col]] <- customColDefs[[col_names[col]]]
# } else {
# colDefs_list[[col]] <- reactable::colDef(name = col_names[col])
# }
#
# if (!is.null(customColDefs[[col_names[col]]]$header)) {
# colDefs_list[[col]]$header <- customColDefs[[col_names[col]]]$header
# }
#
# if (!is.null(customColDefs[[col_names[col]]]$tooltip)) {
# colDefs_list[[col]]$header <-
# withTooltip(colDefs_list[[col]]$header, customColDefs[[col_names[col]]]$tooltip)
# }
#
# # Check if the column is formatted like a JSON file
# if (is_JSON_column(df[[col_names[col]]])) {
# colDefs_list[[col]]$cell <- function(value) {
# tags$button(
# "Download JSON",
# onclick = paste0("downloadJSON('", value, "')")
# )
# }
# }
# }
# } else {
# # Define default colDefs if customColDefs is not provided
# for (col in seq_along(col_names)) {
# colDefs_list[[col]] <- reactable::colDef(name = col_names[col])
#
# # Check if the column is formatted like a JSON file
# if (is_JSON_column(df[[col_names[col]]])) {
# colDefs_list[[col]]$cell <- function(value) {
# tags$button(
# "Download JSON",
# onclick = paste0("downloadJSON('", value, "')")
# )
# }
# }
# }
# }
#
# # Return the list of colDefs
# return(colDefs_list)
# }











ohdsiReactableTheme <- reactable::reactableTheme(
color = "white",
Expand All @@ -226,13 +139,15 @@
#' @param id string, table id must match resultsTableViewer function
#' @param df reactive that returns a data frame
#' @param colDefsInput named list of reactable::colDefs
#' @param downloadedFileName string, desired name of downloaded data file. can use the name from the module that is being used
#'
#' @return shiny module server
#' @export
#'
resultTableServer <- function(id, #string
df, #data.frame
colDefsInput
colDefsInput, #named list
downloadedFileName = NULL #string
) #list of colDefs, can use checkmate::assertList, need a check that makes sure names = columns) {
shiny::moduleServer(id,
function(input, output, session) {
Expand All @@ -258,18 +173,23 @@
})

#need to try adding browser() to all reactives to see why selected cols isnt working


colDefs <-
shiny::reactive(create_colDefs_list(df = df()[, input$dataCols],
customColDefs = colDefsInput))
shiny::reactive({
create_colDefs_list(df = df()[, input$dataCols],
customColDefs = colDefsInput)

Check warning on line 181 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L180-L181

Added lines #L180 - L181 were not covered by tests
})

fullData <- shiny::reactive(df())
fullData <- shiny::reactive({
df()

Check warning on line 185 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L185

Added line #L185 was not covered by tests
})


output$resultData <-
reactable::renderReactable({

data = df()[, input$dataCols]
data = df()[, input$dataCols, drop = F]

tryCatch({

Expand All @@ -289,18 +209,14 @@
defaultColDef = reactable::colDef(align = "left")
#, experimental
#theme = ohdsiReactableTheme
)},

warning = function(w){
shiny::showNotification("Select at least 2 columns!"); return(NULL)

},

)}
,

error = function(e){
shiny::showNotification("Select at least 2 columns!"); return(NULL)

# shiny::showNotification("No columns selected!");
return(NULL)

}

)


Expand All @@ -309,10 +225,10 @@
# download full data button
output$downloadDataFull <- shiny::downloadHandler(
filename = function() {
paste('data-full-', Sys.Date(), '.csv', sep = '')
paste('result-data-full-', downloadedFileName, Sys.Date(), '.csv', sep = '')

Check warning on line 228 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L228

Added line #L228 was not covered by tests
},
content = function(con) {
utils::write.csv(fullData(), con,
row.names = F)

Check warning on line 232 in R/components-data-viewer.R

View check run for this annotation

Codecov / codecov/patch

R/components-data-viewer.R#L231-L232

Added lines #L231 - L232 were not covered by tests
}
)
Expand Down
Loading
Loading