From 4036e8b96855c6f19d7a1dc634f512f79d77c323 Mon Sep 17 00:00:00 2001 From: jinseob kim Date: Sun, 29 Sep 2024 21:40:14 +0900 Subject: [PATCH] cran 1.5.9 --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ R/FilePsInput.R | 4 ++-- R/FileRepeatedInput.R | 2 +- R/FileSurveyInput.R | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8c045ee3..55e63062 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: jsmodule Title: 'RStudio' Addins and 'Shiny' Modules for Medical Research -Version: 1.5.8 -Date: 2024-09-20 +Version: 1.5.9 +Date: 2024-09-29 Authors@R: c( person("Jinseob", "Kim", email = "jinseob2kim@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9403-605X")), person("Zarathu", role = c("cph", "fnd")), diff --git a/NEWS.md b/NEWS.md index e7006389..6020c99c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# jsmodule 1.5.9 +## Bugfix: +- `sav` file load in `FilePSInput.R`, `FileRepeatedInput.R`, `FileSurveyInput.R` + # jsmodule 1.5.8 ## Update diff --git a/R/FilePsInput.R b/R/FilePsInput.R index 8f508a2f..d3ab3fd6 100644 --- a/R/FilePsInput.R +++ b/R/FilePsInput.R @@ -218,7 +218,7 @@ FilePs <- function(input, output, session, nfactor.limit = 20) { return(list( data = out, data_varStruct = data_varStruct, factor_original = factor_vars, conti_original = conti_vars, factor_adds_list = factor_adds_list, - factor_adds = add_vars, naCol = naCol, except_vars = except_vars, ref = ref, naomit = naomit + factor_adds = add_vars, naCol = naCol, except_vars = except_vars, ref = ref, naomit = naomit, data.old = out.old )) }) @@ -402,7 +402,7 @@ FilePs <- function(input, output, session, nfactor.limit = 20) { out.label <- mk.lev(out) if (tools::file_ext(input$file$name) == "sav") { - out.label <- mk.lev2(data()$data.old, out.label) + out.label <- mk.lev2(data.info()$data.old, out.label) } if (!is.null(input$check_binary)) { diff --git a/R/FileRepeatedInput.R b/R/FileRepeatedInput.R index 41240747..6ac6ce57 100644 --- a/R/FileRepeatedInput.R +++ b/R/FileRepeatedInput.R @@ -191,7 +191,7 @@ FileRepeated <- function(input, output, session, nfactor.limit = 20) { # except_vars <- names(nclass)[ nclass== 1 | nclass >= 10] add_vars <- names(nclass)[nclass >= 2 & nclass <= 5] # factor_vars_ini <- union(factor_vars, add_vars) - return(list(data = out, factor_original = factor_vars, conti_original = conti_vars, factor_adds_list = names(nclass)[nclass <= nfactor.limit], factor_adds = add_vars, ref = ref, naomit = naomit)) + return(list(data = out, data.old = out.old, factor_original = factor_vars, conti_original = conti_vars, factor_adds_list = names(nclass)[nclass <= nfactor.limit], factor_adds = add_vars, ref = ref, naomit = naomit)) }) diff --git a/R/FileSurveyInput.R b/R/FileSurveyInput.R index a5f20ea2..ec00e1c2 100644 --- a/R/FileSurveyInput.R +++ b/R/FileSurveyInput.R @@ -191,7 +191,7 @@ FileSurvey <- function(input, output, session, nfactor.limit = 20) { # except_vars <- names(nclass)[ nclass== 1 | nclass >= 10] add_vars <- names(nclass)[nclass >= 2 & nclass <= 5] # factor_vars_ini <- union(factor_vars, add_vars) - return(list(data = out, factor_original = factor_vars, conti_original = conti_vars, factor_adds_list = names(nclass)[nclass <= nfactor.limit], factor_adds = add_vars, ref = ref, naomit = naomit)) + return(list(data = out, data.old = out.old, factor_original = factor_vars, conti_original = conti_vars, factor_adds_list = names(nclass)[nclass <= nfactor.limit], factor_adds = add_vars, ref = ref, naomit = naomit)) })