Skip to content

Commit

Permalink
Update prints
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinamullin committed Feb 2, 2024
1 parent 9bafba1 commit c651241
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ app_server <- function(input, output, session) {

# update the master 'Remove' column anytime data is added to the 'remove' table
shiny::observeEvent(tadat$removals, {
print("Removals changed")
print("Updating removals column")
print(dim(tadat$removals))
print(sum(tadat$raw$TADA.Remove))
if (dim(tadat$removals)[2] > 0) {
print("Updating remove col")
print("Updating removals column")
tadat$raw$TADA.Remove <- apply(tadat$removals, 1, any)
}
print(sum(tadat$raw$TADA.Remove))
Expand Down
2 changes: 1 addition & 1 deletion R/mod_TADA_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ mod_TADA_summary_server <- function(id, tadat) {
# calculate the stats needed to fill the summary box
shiny::observe({
shiny::req(tadat$raw)
print("tadat$raw has been changed (i think?)")
print("Updating summary stats")
print(nrow(tadat$raw))
summary_things$rem_rec <-
length(tadat$raw$ResultIdentifier[tadat$raw$TADA.Remove ==
Expand Down
2 changes: 1 addition & 1 deletion R/mod_censored_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ mod_censored_data_server <- function(id, tadat) {
) # reset to detection quantitation limit value
tadat$raw$TADA.ResultMeasureValueDataTypes.Flag[tadat$raw$TADA.ResultMeasureValueDataTypes.Flag == "Result Value/Unit Estimated from Detection Limit"] <-
"Result Value/Unit Copied from Detection Limit" # reset data types flag to what it was before simpleCensoredMethods function run
print(1234)
# print(1234)
print(nrow(tadat$raw))
tadat$raw <- tadat$raw %>% dplyr::select(-TADA.CensoredMethod)
print(nrow(tadat$raw))
Expand Down
8 changes: 4 additions & 4 deletions R/mod_data_flagging.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ mod_data_flagging_server <- function(id, tadat) {

# Add flagging columns to raw table, make sure line below is
# not commented out once done with testing
print(2345)
# print(2345)
print(nrow(tadat$raw))
tadat$raw <- applyFlags(tadat$raw, tadat$orgs)
print(nrow(tadat$raw))
#write.csv(tadat$raw, "flagged.csv")
#tadat$raw = utils::read.csv("flagged.csv") # THIS IS TRIPS WORKING FILE FOR TESTING, COMMENT OUT WHEN COMMITTING TO DEVELOP
# write.csv(tadat$raw, "flagged.csv")
# tadat$raw = utils::read.csv("flagged.csv") # THIS IS TRIPS WORKING FILE FOR TESTING, COMMENT OUT WHEN COMMITTING TO DEVELOP

# Remove progress bar and display instructions
shinybusy::remove_modal_spinner(session = shiny::getDefaultReactiveDomain())
Expand All @@ -221,7 +221,7 @@ mod_data_flagging_server <- function(id, tadat) {
tadat$raw <-
TADA::TADA_ConvertDepthUnits(tadat$raw, unit = "ft")
}
print(3456)
# print(3456)
print(nrow(tadat$raw))
if (input$m2f == "inches") {
shinybusy::show_modal_spinner(
Expand Down
4 changes: 2 additions & 2 deletions R/mod_harmonize_np.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ mod_harmonize_np_server <- function(id, tadat) {
dat <- subset(tadat$raw, tadat$raw$TADA.Remove == FALSE)
rem <- subset(tadat$raw, tadat$raw$TADA.Remove == TRUE)
dat <- TADA::TADA_HarmonizeSynonyms(dat, ref = harm$ref)
print(4567)
# print(4567)
print(nrow(tadat$raw))
tadat$raw <- plyr::rbind.fill(dat, rem)
tadat$raw <- TADA::TADA_OrderCols(tadat$raw)
Expand Down Expand Up @@ -224,7 +224,7 @@ mod_harmonize_np_server <- function(id, tadat) {
new_df <- as.data.frame(matrix(FALSE, ncol = ncols, nrow = nrows))
names(new_df) <- names(tadat$removals)
tadat$removals <- plyr::rbind.fill(tadat$removals, new_df)
print(5678)
# print(5678)
print(nrow(tadat$raw))
tadat$raw <- plyr::rbind.fill(dat, rem)
tadat$raw <- TADA::TADA_OrderCols(tadat$raw)
Expand Down
2 changes: 1 addition & 1 deletion R/mod_query_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ initializeTable <- function(tadat, raw) {
removals <- data.frame(matrix(nrow = nrow(raw), ncol = 0))
# removals["Media Type"] = ifelse(!raw$TADA.ActivityMediaName%in%c("WATER"),TRUE,raw$Removed)
# removals["Special Characters"] = ifelse(raw$TADA.ResultMeasureValueDataTypes.Flag%in%c("ND or NA","Text","Coerced to NA"),TRUE,raw$Removed)
print(6789)
# print(6789)
print(nrow(tadat$raw))
tadat$raw <- raw
print(nrow(tadat$raw))
Expand Down
2 changes: 1 addition & 1 deletion R/utils_track_progress.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ writeFile <- function(tadat, filename) {
readFile <- function(tadat, filename) {
load(filename, verbose = FALSE)
tadat$load_progress_file = filename
print("loading progress file")
print("Loading progress file")
print(nrow(tadat$raw))
# Confirm compatibility
job_id = job_id
Expand Down

0 comments on commit c651241

Please sign in to comment.