diff --git a/R/cluster.R b/R/cluster.R index 854f679..826a88f 100755 --- a/R/cluster.R +++ b/R/cluster.R @@ -13,7 +13,7 @@ cluster <- function(x, centers, xte = NULL, ...) { x_trans <- t(x) y <- pipeline({ centers - apply(1, function(y) colSums(x_trans - y) ^ 2) + apply(1, function(y) colSums((x_trans - y) ^ 2)) apply(1, which.min) }) rm(x_trans) diff --git a/R/read_qnt.R b/R/read_qnt.R index c9cd718..4cdc86c 100644 --- a/R/read_qnt.R +++ b/R/read_qnt.R @@ -50,7 +50,7 @@ read_qnt <- function( 'wt' ) %>>% (setNames(paste0(., '.qnt'), .)) %>>% - # `[`(file.exists(.)) %>>% + `[`(file.exists(.)) %>>% lapply(fread) elemw <- c('.cnd/elemw.cnd', 'Pos_0001/data001.cnd')