Skip to content

Commit

Permalink
v2.0.7.9035
Browse files Browse the repository at this point in the history
- refactor: Add pop up on HOBOware reformat for date time conversion
  - Success and failure
  • Loading branch information
leppott committed Nov 4, 2024
1 parent 4471628 commit 8300e54
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ContDataQC
Title: Quality Control (QC) of Continous Monitoring Data
Version: 2.0.7.9034
Version: 2.0.7.9035
Authors@R: c(
person("Erik W", "Leppo", email="[email protected]",role=c("aut","cre")),
person("Ann","Roseberry Lincoln", role="ctb"),
Expand Down
9 changes: 8 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ NEWS-ContDataQC

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-10-18 09:53:59.053843
#> Last Update: 2024-11-04 13:25:07.843989

# Version History

## v2.0.7.9035

2024-11-04

- refactor: Add pop up on HOBOware reformat for date time conversion
- Success and failure

## v2.0.7.9034

2024-10-18
Expand Down
9 changes: 8 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ NEWS-ContDataQC

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-10-18 09:53:59.053843
#> Last Update: 2024-11-04 13:25:07.843989

# Version History

## v2.0.7.9035

2024-11-04

- refactor: Add pop up on HOBOware reformat for date time conversion
- Success and failure

## v2.0.7.9034

2024-10-18
Expand Down
6 changes: 6 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ cat(paste0("Last Update: ",Sys.time()))

# Version History

## v2.0.7.9035
2024-11-04

* refactor: Add pop up on HOBOware reformat for date time conversion
+ Success and failure

## v2.0.7.9034
2024-10-18

Expand Down
2 changes: 1 addition & 1 deletion inst/shiny-examples/ContDataQC/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ library(shinyalert)
# Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:\\Rtools\\bin", sep = ";"))

# Version Number
version <- "2.0.7.9034"
version <- "2.0.7.9035"

#Maximum individual file size that can be uploaded is 70 MB
options(shiny.maxRequestSize = 70 * 1024^2)
Expand Down
38 changes: 38 additions & 0 deletions inst/shiny-examples/ContDataQC/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,11 @@ shinyServer(function(input, output, session) {
message("File Name Vector")
message(fileNameVector)

#~~~
# testing, 2024-11-04
# test after, too much to check before
#~~~

#Changes the status bar to say that aggregation is occurring
incProgress(0, detail = paste("Format Hobo ", length(fileNameVector), " files"))

Expand All @@ -582,6 +587,39 @@ shinyServer(function(input, output, session) {
) # formatHOBO ~ END
)## consoleRow ~ END

#~~~
# testing, 2024-11-04
df_test <- utils::read.delim(file.path("HOBO", fileNameVector)
, skip = 0
, header = TRUE
, sep = ","
, check.names = FALSE
, stringsAsFactors = FALSE)
# pop up
na_date <- is.na(df_test[,ContData.env$myName.DateTime])
if (any(na_date)) {
# pop up
n_na <- sum(na_date)
msg <- paste0("Some 'Date Time' records did not convert!\n\n"
, n_na, " / ", nrow(df_test), " records converted to 'NA'.\n\n"
, "The user specified format '"
, HOBO_DateFormat_User
, "' "
, "did not match the data.\n\n"
, "Try another format and/or check your data in Notepad "
, "(or other similar text editor). "
, "Avoid Excel as it doesn't show dates or times 'as is'.")
} else {
msg <- "Date Time converted without issues."
}## IF ~ any NA in datetime
shinyalert::shinyalert(title = "HOBOware Date Time Conversion"
, text = msg
, type = "info"
, closeOnEsc = TRUE
, closeOnClickOutside = TRUE)
validate(msg)
#~~~

#Appends the R console output generated from that input file to the
#console output data.frame
consoleRow <- data.frame(consoleRow)
Expand Down

0 comments on commit 8300e54

Please sign in to comment.