Commit 89dd3f3a authored by Lorenz Kapsner's avatar Lorenz Kapsner

fixed bug when sampling mutliple pat ids

parent bbb71b6f
Pipeline #8897 passed with stages
in 37 minutes and 47 seconds
Package: kosmicGUI
Title: GUI for Reference Interval Estimation
Version: 0.0.5
Version: 0.0.6
Authors@R:
c(person(given = "Lorenz A.",
family = "Kapsner",
......@@ -16,7 +16,7 @@ URL: https://gitlab.miracum.org/ume-labor/kosmicr
BugReports: https://gitlab.miracum.org/ume-labor/kosmicr/issues
Encoding: UTF-8
Copyright: Universitätsklinikum Erlangen
Date/Publication: 2020-04-20 15:02:19 UTC
Date/Publication: 2020-05-07 12:03:53 UTC
Depends:
R (>= 2.10)
Imports:
......@@ -39,3 +39,4 @@ Suggests:
tinytex,
knitr,
lintr
RoxygenNote: 7.1.0
......@@ -16,4 +16,5 @@ import(shiny)
import(shinydashboard)
importFrom(data.table,":=")
importFrom(data.table,.N)
importFrom(data.table,.SD)
importFrom(magrittr,"%>%")
......@@ -28,9 +28,10 @@ createX <- function(rv, input) { # nolint
if (!isFALSE(rv$id_col)) {
set.seed(0)
# TODO is this correct?
rv$data_subset <-
rv$data[!is.na(rv$value_col), sample(rv$value_col, 1)]
rv$data[!is.na(get(rv$value_col)),
.SD[sample(.N, min(1, .N))],
by = eval(rv$id_col)]
}
# case if data is selected based on age and gender
......@@ -38,6 +39,11 @@ createX <- function(rv, input) { # nolint
cat("\nGot age and gender selection\n")
print(input[["moduleFileupload-ageSlider"]][1])
print(input[["moduleFileupload-ageSlider"]][2])
rv$data_subset[, (rv$age_col) := as.numeric(
gsub("\\,", ".", get(rv$age_col))
)]
rv$data_subset.present <- # nolint
rv$data_subset[get(rv$age_col) >=
input[["moduleFileupload-ageSlider"]][1] &
......@@ -48,6 +54,11 @@ createX <- function(rv, input) { # nolint
# case if data is selected based on age
} else if (!isFALSE(rv$age_col)) {
cat("\nGot only age selection\n")
rv$data_subset[, (rv$age_col) := as.numeric(
gsub("\\,", ".", get(rv$age_col))
)]
rv$data_subset.present <- # nolint
rv$data_subset[get(rv$age_col) >=
input[["moduleFileupload-ageSlider"]][1] &
......
......@@ -22,7 +22,7 @@
#'
#' @import shiny shinydashboard
#' @importFrom magrittr "%>%"
#' @importFrom data.table .N ":="
#' @importFrom data.table .N ":=" .SD
#'
#' @export
#'
......
......@@ -16,7 +16,7 @@ my_desc$set("Copyright", "Universitätsklinikum Erlangen")
# Remove some author fields
my_desc$del("Maintainer")
# Set the version
my_desc$set_version("0.0.5")
my_desc$set_version("0.0.6")
# The title of your package
my_desc$set(Title = "GUI for Reference Interval Estimation")
# The description of your package
......@@ -103,8 +103,8 @@ usethis::use_data(example_data, internal = FALSE, overwrite = TRUE)
# install rle via RStudio terminal
# cd /home/user/ && \
# git clone https://gitlab.miracum.org/kosmic/kosmic.git && \
# cd kosmic && \
# cd /home/user/
# git clone https://gitlab.miracum.org/kosmic/kosmic.git
# cd kosmic
# make
No preview for this file type
......@@ -3,7 +3,7 @@ version: '3'
services:
kosmic:
container_name: kosmic_container
image: docker.miracum.org/kosmic/kosmic_img:0.0.5
image: docker.miracum.org/kosmic/kosmic_img:0.0.6
restart: unless-stopped
ports:
- "3839:3838"
......
......@@ -3,7 +3,7 @@ version: '3'
services:
kosmic:
container_name: kosmic_container
image: docker.miracum.org/kosmic/kosmic_img:0.0.5
image: docker.miracum.org/kosmic/kosmic_img:0.0.6
restart: unless-stopped
ports:
- "3838:3838"
......
......@@ -2,7 +2,7 @@ version: '3.7'
services:
kosmic:
image: docker.miracum.org/kosmic/kosmic_img:0.0.5
image: docker.miracum.org/kosmic/kosmic_img:0.0.6
restart: unless-stopped
deploy:
replicas: 1
......
#!/bin/bash
sh deploy_image.sh docker.miracum.org/kosmic kosmic_img 0.0.5
sh deploy_image.sh docker.miracum.org/kosmic kosmic_img 0.0.6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment