From f9c8b6d069d03c4cdc06c934ec4e0a6816b28b9c Mon Sep 17 00:00:00 2001 From: Neves-P Date: Thu, 14 Apr 2022 12:37:41 +0200 Subject: [PATCH 1/3] Check object class using is() --- R/DAISIE_plot_age_diversity.R | 2 +- R/DAISIE_plot_island.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/DAISIE_plot_age_diversity.R b/R/DAISIE_plot_age_diversity.R index 026d5266..f3248cb8 100644 --- a/R/DAISIE_plot_age_diversity.R +++ b/R/DAISIE_plot_age_diversity.R @@ -33,7 +33,7 @@ DAISIE_plot_age_diversity <- function( island, title = "Clade age vs clade diversity", island_age = NA) { - if (class(island) == "data.frame") { + if (is.data.frame(island)) { if (is.na(island_age)) { stop("Island age must be specified if the input file is a table") } diff --git a/R/DAISIE_plot_island.R b/R/DAISIE_plot_island.R index 6119734e..fca05d85 100644 --- a/R/DAISIE_plot_island.R +++ b/R/DAISIE_plot_island.R @@ -34,7 +34,7 @@ #' #' @export DAISIE_plot_island DAISIE_plot_island <- function (island, island_age = NA) { - if (class(island) == "data.frame") { + if (is.data.frame(island)) { if (is.na(island_age)) { stop("Island age must be specified if the input file is a table") } From d5508b2c8926d05b238e8121044a5faaa1a25921 Mon Sep 17 00:00:00 2001 From: Neves-P Date: Thu, 14 Apr 2022 12:39:19 +0200 Subject: [PATCH 2/3] Increment version number to 4.1.1 --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9e81a0ec..8e6cf02e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: DAISIE Type: Package Title: Dynamical Assembly of Islands by Speciation, Immigration and Extinction -Version: 4.1.0 -Date: 2022-04-13 +Version: 4.1.1 +Date: 2022-04-14 Depends: R (>= 3.5.0) biocViews: SystemRequirements: C++14 diff --git a/NEWS.md b/NEWS.md index ff6ed81e..8fbf6be0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# DAISIE 4.1.1 + +* Correctly use `is.data.frame()` rather than `class(foo) == "data.frame"` to satisfy CRAN note. + # DAISIE 4.1.0 * Rework IW simulation code to: From 2a374d15575b891284115208126cb91688aa42f9 Mon Sep 17 00:00:00 2001 From: Neves-P Date: Thu, 14 Apr 2022 13:09:01 +0200 Subject: [PATCH 3/3] Add refs --- R/DAISIE-package.R | 4 +++- man/DAISIE-package.Rd | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/DAISIE-package.R b/R/DAISIE-package.R index 857a5bd8..66572b99 100644 --- a/R/DAISIE-package.R +++ b/R/DAISIE-package.R @@ -14,7 +14,9 @@ #' \item Valente, L., Phillimore, A. B., Melo, M., Warren, B. H., Clegg, S. M., Havenstein, K., & Etienne, R. S. (2020). A simple dynamic model explains the diversity of island birds worldwide. Nature 579: 92-96. \doi{10.1038/s41586-020-2022-5}.\cr #' \item Hauffe, T., Delicado, D., Etienne, R.S., & Valente, L. (2020). Lake expansion elevates equilibrium diversity via increasing colonization. Journal of Biogeography 47: 1849–1860. \doi{10.1111/jbi.13914}.\cr #' \item Valente, L., Kristensen, N., Phillimore, A. B., & Etienne, R. S. (2021). Report of programming bugs in the DAISIE R package: consequences and correction. EcoEvoRxiv. \doi{10.32942/osf.io/w5ntf}.\cr -#' \item Santos Neves, P., Lambert, J. W., Valente, L., & Etienne, R. S. (2021).The robustness of a simple dynamic model of island biodiversity to geological and eustatic change. bioRxiv 2021.07.26.453064. \doi{10.1101/2021.07.26.453064}.\cr +#' \item Santos Neves, P., Lambert, J. W., Valente, L., & Etienne, R. S. (2021).The robustness of a simple dynamic model of island biodiversity to geological and eustatic change. bioRxiv. \doi{10.1101/2021.07.26.453064}.\cr +#' \item Lambert, J. W., Santos Neves, P., Bilderbeek, R. L. C., Valente, L., Etienne, R. S. (2022). The effect of mainland dynamics on data and parameter estimates in island biogeography. bioRxiv. \doi{10.1101/2022.01.13.476210}.\cr +#' \item Xie, S., Valente, L., Etienne, R. S. (2022). A simple island biodiversity model is robust to trait dependence in diversification and colonization rates. biRrxiv. \doi{10.1101/2022.01.01.474685}.\cr #' } #' @keywords internal #' @import Rcpp diff --git a/man/DAISIE-package.Rd b/man/DAISIE-package.Rd index 521c67c5..9260d5d4 100644 --- a/man/DAISIE-package.Rd +++ b/man/DAISIE-package.Rd @@ -23,7 +23,9 @@ Cladogenesis and immigration rates can be dependent on diversity. \item Valente, L., Phillimore, A. B., Melo, M., Warren, B. H., Clegg, S. M., Havenstein, K., & Etienne, R. S. (2020). A simple dynamic model explains the diversity of island birds worldwide. Nature 579: 92-96. \doi{10.1038/s41586-020-2022-5}.\cr \item Hauffe, T., Delicado, D., Etienne, R.S., & Valente, L. (2020). Lake expansion elevates equilibrium diversity via increasing colonization. Journal of Biogeography 47: 1849–1860. \doi{10.1111/jbi.13914}.\cr \item Valente, L., Kristensen, N., Phillimore, A. B., & Etienne, R. S. (2021). Report of programming bugs in the DAISIE R package: consequences and correction. EcoEvoRxiv. \doi{10.32942/osf.io/w5ntf}.\cr -\item Santos Neves, P., Lambert, J. W., Valente, L., & Etienne, R. S. (2021).The robustness of a simple dynamic model of island biodiversity to geological and eustatic change. bioRxiv 2021.07.26.453064. \doi{10.1101/2021.07.26.453064}.\cr +\item Santos Neves, P., Lambert, J. W., Valente, L., & Etienne, R. S. (2021).The robustness of a simple dynamic model of island biodiversity to geological and eustatic change. bioRxiv. \doi{10.1101/2021.07.26.453064}.\cr +\item Lambert, J. W., Santos Neves, P., Bilderbeek, R. L. C., Valente, L., Etienne, R. S. (2022). The effect of mainland dynamics on data and parameter estimates in island biogeography. bioRxiv. \doi{10.1101/2022.01.13.476210}.\cr +\item Xie, S., Valente, L., Etienne, R. S. (2022). A simple island biodiversity model is robust to trait dependence in diversification and colonization rates. biRrxiv. \doi{10.1101/2022.01.01.474685}.\cr } } \seealso{