diff --git a/NEWS.md b/NEWS.md index f6c9878c..7ed4f03b 100755 --- a/NEWS.md +++ b/NEWS.md @@ -35,6 +35,7 @@ roundness <- function(matrix) { * `space.maker` can now generate specific row names and be replicated to generate a bunch of spaces (via the new optional arguments `elements.names` and `replicates` respectively). * The `add.tree` utility function now has an optional argument to override any existing trees (`replace = TRUE`) or not (`replace = FALSE`; which remains the default previous behaviour). * `print.dispRity` now recognises and highlights simulated data from the [`treats`](https://github.com/tguillerme/treats) package. + * Improved `NA` management for `S3` functions. ### BUG FIXES diff --git a/R/summary.dispRity_fun.R b/R/summary.dispRity_fun.R index 18694063..d41d9451 100755 --- a/R/summary.dispRity_fun.R +++ b/R/summary.dispRity_fun.R @@ -9,7 +9,7 @@ get.summary <- function(disparity_subsets_rare, cent.tend, quantiles, ...) { output <- list() ## Summarising NA - if(is.na(disparity_subsets_rare[[1]])) { + if(all(is.na(disparity_subsets_rare))) { if(!missing(cent.tend)) { output$cent.tend <- NA }