From a9576d3b73062a48b36c982c420101b150a5b806 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 2 Sep 2024 15:42:56 +0200 Subject: [PATCH] columnname fix for summary algo --- docker/vtg.summary.Dockerfile | 5 +++++ vtg.summary/src/R/RPC_summary.R | 1 + 2 files changed, 6 insertions(+) diff --git a/docker/vtg.summary.Dockerfile b/docker/vtg.summary.Dockerfile index 99f3bc7..4b817ea 100644 --- a/docker/vtg.summary.Dockerfile +++ b/docker/vtg.summary.Dockerfile @@ -20,6 +20,11 @@ RUN Rscript -e 'install.packages("/usr/local/R/vtg.preprocessing", \ COPY ./${PKG_NAME}/src /usr/local/R/${PKG_NAME}/ WORKDIR /usr/local/R/${PKG_NAME} +# Install R and necessary packages +# Somehow prettyunit crashes when installed using the `install_deps` +RUN R -e "remove.packages('prettyunits')" +RUN R -e "install.packages('prettyunits', repos='http://cran.rstudio.com/')" + RUN Rscript -e 'library(devtools)' -e 'install_github("IKNL/vtg")' RUN Rscript -e 'devtools::install_deps(".")' RUN Rscript -e 'install.packages(".", repos = NULL, type = "source", INSTALL_opts = "--no-multiarch")' diff --git a/vtg.summary/src/R/RPC_summary.R b/vtg.summary/src/R/RPC_summary.R index a7a5098..8b4a8d8 100644 --- a/vtg.summary/src/R/RPC_summary.R +++ b/vtg.summary/src/R/RPC_summary.R @@ -137,6 +137,7 @@ get_column_ranges <- function(data, columns) { colnames(summary_numeric) <- numeric_columns } else { summary_numeric <- do.call(cbind, lapply(data[, numeric_columns], summary)) + colnames(summary_numeric) <- numeric_columns } }