From 48867f1ad72218eb084dc11d7311bc01dfc86b10 Mon Sep 17 00:00:00 2001 From: Schultheis Date: Wed, 28 Mar 2018 14:58:20 +0200 Subject: [PATCH 1/2] featureSelector: fixed bug not showing table containing NA --- R/featureSelector.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/featureSelector.R b/R/featureSelector.R index 8618491..f77bb01 100644 --- a/R/featureSelector.R +++ b/R/featureSelector.R @@ -229,7 +229,7 @@ featureSelector <- function(input, output, session, data, features = NULL, featu render = DT::JS( "function(data, type, row) {", paste("var length =", truncate), - "return typeof data !== 'number' && type === 'display' && data.length > length ?", + "return typeof data !== 'number' && data !== null && type === 'display' && data.length > length ?", "'' + data.substr(0, length) + '...' : data;", "}" ) From 3eb67874cb60cc5aa2ce0c132137dd1c08390afa Mon Sep 17 00:00:00 2001 From: Schultheis Date: Tue, 3 Apr 2018 10:16:25 +0200 Subject: [PATCH 2/2] parser: use data.table::fread instead of kmisc::readlines as it is no longer available in cran --- DESCRIPTION | 1 - R/parser.R | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cd6b0fe..53c6f7a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,7 +34,6 @@ Imports: shiny, gplots, reshape, rintrojs, - Kmisc, webshot, RJSONIO, ggrepel (>= 0.6.12), diff --git a/R/parser.R b/R/parser.R index 5367f3c..c10c166 100644 --- a/R/parser.R +++ b/R/parser.R @@ -303,7 +303,7 @@ parser <- function(file, dec = ".") { message(paste("Parsing file:", file)) #number of rows for each part - file.lines <- Kmisc::readlines(file) + file.lines <- data.table::fread(file, header = FALSE, fill = TRUE, select = 1)[[1]] num.header <- length(grep("^!", file.lines)) num.metadata <- length(grep("^#", file.lines))