From 0e03ec1b022b16c6644721cb18003835ee070d54 Mon Sep 17 00:00:00 2001 From: richardjtelford Date: Fri, 19 Jun 2020 18:50:27 +0200 Subject: [PATCH] fixes #244 drop=FALSE --- R/get_download.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/get_download.R b/R/get_download.R index 05eefcf..264d1b7 100755 --- a/R/get_download.R +++ b/R/get_download.R @@ -526,7 +526,7 @@ get_download.default <- function(x, verbose = TRUE) { take <- !(taxon.list$taxon.group == "Laboratory analyses" | taxon.list$taxon.group == "Charcoal") - count.data <- t(cast_table[take, 7:ncol(cast_table)]) + count.data <- t(cast_table[take, 7:ncol(cast_table), drop = FALSE]) if ('alias' %in% colnames(taxon.list)) { colnames(count.data) <- taxon.list$alias[take] } else { @@ -537,7 +537,7 @@ get_download.default <- function(x, verbose = TRUE) { # the same way as the previous: if (sum(take) > 0) { - lab.data <- t(cast_table[!take, 7:ncol(cast_table)]) + lab.data <- t(cast_table[!take, 7:ncol(cast_table), drop = FALSE]) colnames(lab.data) <- taxon.list$alias[!take] } else { lab.data <- NULL