From 2c8c19a3d41b0cf216c55dcf980cbd5686072a23 Mon Sep 17 00:00:00 2001 From: Andrea Manica Date: Fri, 3 Nov 2023 22:36:58 +0000 Subject: [PATCH] small doc fixes --- R/sample_pseudoabs_time.R | 10 ++++------ R/sdm_spec_boost_tree.R | 10 ++++------ R/sdm_spec_maxent.R | 10 ++++------ R/sdm_spec_rand_forest.R | 10 ++++------ R/simple_ensemble.R | 8 +++----- cran_comments.md => cran-comments.md | 3 ++- inst/WORDLIST | 1 + 7 files changed, 22 insertions(+), 30 deletions(-) rename cran_comments.md => cran-comments.md (89%) diff --git a/R/sample_pseudoabs_time.R b/R/sample_pseudoabs_time.R index 290ba430..4fcdc131 100644 --- a/R/sample_pseudoabs_time.R +++ b/R/sample_pseudoabs_time.R @@ -4,20 +4,18 @@ #' of semantics) points from a raster given a set of presences. #' The locations returned as the center points of the sampled cells, which can #' not overlap with the presences. The following methods are implemented: -#' {/itemize: -#' /item: 'random': pseudo-absences/background randomly sampled from the region covered by the +#' * 'random': pseudo-absences/background randomly sampled from the region covered by the #' raster (i.e. not NAs). -#' /item: 'dist_min': pseudo-absences/background randomly sampled from the region excluding a buffer +#' * 'dist_min': pseudo-absences/background randomly sampled from the region excluding a buffer #' of 'dist_min' from presences (distances in 'm' for lonlat rasters, and in map #' units for projected rasters). -#' /item: 'dist_max': pseudo-absences/background randomly sampled from the unioned buffers +#' * 'dist_max': pseudo-absences/background randomly sampled from the unioned buffers #' of 'dist_max' from presences (distances in 'm' for lonlat rasters, and in map #' units for projected rasters). Using the union of buffers means that areas that #' are in multiple buffers are not oversampled. This is also referred to as "thickening". -#' /item: 'dist_disc': pseudo-absences/background randomly sampled from the unioned discs around presences +#' * 'dist_disc': pseudo-absences/background randomly sampled from the unioned discs around presences #' with the two values of 'dist_disc' defining the minimum and maximum distance from #' presences. -#' } #' @param data An [`sf::sf`] data frame, or a data frame with coordinate variables. #' These can be defined in `coords`, unless they have standard names #' (see details below). diff --git a/R/sdm_spec_boost_tree.R b/R/sdm_spec_boost_tree.R index 2852d954..a5798016 100644 --- a/R/sdm_spec_boost_tree.R +++ b/R/sdm_spec_boost_tree.R @@ -6,16 +6,14 @@ #' @param ... parameters to be passed to [parsnip::boost_tree()] to #' customise the model. See the help of that function for details. #' @param tune character defining the tuning strategy. Valid strategies are: -#' {itemize: -#' /item: "sdm" chooses hyperparameters that are most important to tune for +#' * "sdm" chooses hyperparameters that are most important to tune for #' an sdm (for *boost_tree*: 'mtry', 'trees', 'tree_depth', 'learn_rate', #' 'loss_reduction', and 'stop_iter') -#' /item: "all" tunes all hyperparameters (for *boost_tree*: 'mtry', 'trees', +#' * "all" tunes all hyperparameters (for *boost_tree*: 'mtry', 'trees', #' 'tree_depth', 'learn_rate', #' 'loss_reduction', 'stop_iter','min_n' and 'sample_size') -#' /item: "custom" passes the options from '...' -#' /item: "none" does not tune any hyperparameter -#' } +#' * "custom" passes the options from '...' +#' * "none" does not tune any hyperparameter #' @returns a [parsnip::model_spec] of the model. #' @examples #' standard_bt_spec <- sdm_spec_boost_tree() diff --git a/R/sdm_spec_maxent.R b/R/sdm_spec_maxent.R index 08a93cdc..5297080f 100644 --- a/R/sdm_spec_maxent.R +++ b/R/sdm_spec_maxent.R @@ -7,13 +7,11 @@ #' @param ... parameters to be passed to [maxent()] to #' customise the model. See the help of that function for details. #' @param tune character defining the tuning strategy. Valid strategies are: -#' {itemize: -#' /item: "sdm" chooses hyperparameters that are most important to tune for +#' * "sdm" chooses hyperparameters that are most important to tune for #' an sdm (for *maxent*, 'mtry') -#' /item: "all" tunes all hyperparameters (for *maxent*, 'mtry', 'trees' and 'min') -#' /item: "custom" passes the options from '...' -#' /item: "none" does not tune any hyperparameter -#' } +#' * "all" tunes all hyperparameters (for *maxent*, 'mtry', 'trees' and 'min') +#' * "custom" passes the options from '...' +#' * "none" does not tune any hyperparameter #' @returns a [parsnip::model_spec] of the model. #' @examples #' test_maxent_spec <- sdm_spec_maxent(tune = "sdm") diff --git a/R/sdm_spec_rand_forest.R b/R/sdm_spec_rand_forest.R index dfb325e4..63d94df5 100644 --- a/R/sdm_spec_rand_forest.R +++ b/R/sdm_spec_rand_forest.R @@ -9,13 +9,11 @@ #' @param ... parameters to be passed to [parsnip::rand_forest()] to #' customise the model. See the help of that function for details. #' @param tune character defining the tuning strategy. Valid strategies are: -#' {itemize: -#' /item: "sdm" chooses hyperparameters that are most important to tune for +#' * "sdm" chooses hyperparameters that are most important to tune for #' an sdm (for *rf*, 'mtry') -#' /item: "all" tunes all hyperparameters (for *rf*, 'mtry', 'trees' and 'min') -#' /item: "custom" passes the options from '...' -#' /item: "none" does not tune any hyperparameter -#' } +#' * "all" tunes all hyperparameters (for *rf*, 'mtry', 'trees' and 'min') +#' * "custom" passes the options from '...' +#' * "none" does not tune any hyperparameter #' @returns a [parsnip::model_spec] of the model. #' @examples #' test_rf_spec <- sdm_spec_rf(tune = "sdm") diff --git a/R/simple_ensemble.R b/R/simple_ensemble.R index c8eafed8..bff63007 100644 --- a/R/simple_ensemble.R +++ b/R/simple_ensemble.R @@ -9,13 +9,11 @@ #' @param ... not used, this function just creates an empty `simple_ensemble` #' object. Members are added with `add_best_candidates()` #' @returns an empty `simple_ensemble`. This is a tibble with columns: -#' {/itemize: -#' /item: `wflow_id`: the name of the workflows for which the best model was +#' * `wflow_id`: the name of the workflows for which the best model was #' chosen -#' /item: `workflow`: the trained workflow objects -#' /item: `metrics`: metrics based on the crossvalidation resampling used +#' * `workflow`: the trained workflow objects +#' * `metrics`: metrics based on the crossvalidation resampling used #' to tune the models -#' } #' @export simple_ensemble <- function(...) { diff --git a/cran_comments.md b/cran-comments.md similarity index 89% rename from cran_comments.md rename to cran-comments.md index 8f9b34d2..8bbaad2c 100644 --- a/cran_comments.md +++ b/cran-comments.md @@ -2,13 +2,14 @@ This is a new package not present on CRAN yet. On all testing environment (see below), we only get a note because of the package being a new submission, and a false positive for mispelling -(paleoclimate is an existing word and is spelled correctly). +(author name in the reference, and tidymodels). ## Test environments - R-hub windows-x86_64-devel (r-devel) - R-hub ubuntu-gcc-release (r-release) - R-hub fedora-clang-devel (r-devel) - devtools::check_mac_release +- devtools::check_win_devel() ## R CMD check results On all systems: diff --git a/inst/WORDLIST b/inst/WORDLIST index 77e4941a..3f739322 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -24,6 +24,7 @@ Schmiegelow SpatRaster StackOverflow TSS +Tidymodels Trang WGS WorldClim