diff --git a/assets/LBM/lbi/algorithms/tables.R b/assets/LBM/lbi/algorithms/tables.R index fd93dd4..b38ea67 100644 --- a/assets/LBM/lbi/algorithms/tables.R +++ b/assets/LBM/lbi/algorithms/tables.R @@ -179,7 +179,9 @@ tableLBI.inputPars <- function(lbi_dat, input, format = "datatable"){ a = input$LBI_LWa, b = input$LBI_LWb) ind.remove <- which(is.na(tab[1,])) - tab <- tab[,-ind.remove] + if(length(ind.remove) > 0){ + tab <- tab[,-ind.remove] + } if(format == "datatable"){ labs <- c("Bin size", @@ -212,11 +214,14 @@ tableLBI.inputPars <- function(lbi_dat, input, format = "datatable"){ "a", "b") } - colnames(tab) <- labs[-ind.remove] ## Selection + if(length(ind.remove) > 0){ + labs <- labs[-ind.remove] + } + colnames(tab) <- labs tmp <- tab - labs <- labs[-ind.remove] + ## Rounding tmp[,which(labs != "Length unit")] <- signif(tmp[,which(labs != "Length unit")], diff --git a/assets/LBM/lbspr/algorithms/tables.R b/assets/LBM/lbspr/algorithms/tables.R index ed687a6..aa42e3c 100644 --- a/assets/LBM/lbspr/algorithms/tables.R +++ b/assets/LBM/lbspr/algorithms/tables.R @@ -73,10 +73,11 @@ tableLBSPR.inputPars <- function(lbspr_dat, input, format = "datatable"){ "b") } - ## Selection + if(length(ind.remove) > 0){ + labs <- labs[-ind.remove] + } tmp <- tab - labs <- labs[-ind.remove] ## Rounding tmp[,which(labs != "Length unit")] <- signif(tmp[,which(labs != "Length unit")],