diff --git a/dev/tag-message b/dev/tag-message index 88fecd178b6ef33b51e7cda8c2d52fb37cd5f7d7..ca34e410692862b3af6d9940dc96c848a47ea6a7 100644 --- a/dev/tag-message +++ b/dev/tag-message @@ -1,17 +1,18 @@ -so.ii Version: 1.0.29.0 +so.ii Version: 1.0.29.1 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ **Note de version** - * MAJ de map_so_ii * MAJ de add_bar + * MAJ de add_inset + * MAJ de map_so_ii **Détails** - * map_so_ii ajustement de l'appel de add_bar pour permettre de définir - directement depuis l'appel les paramètres de add_bar - * add_bar: changement des noms des paramètres pour plus de clarté dans appel - dans map_so_ii + * add_bar: correction bug, ajout de "..." comme paramètre + * add_inset: suppression de warnings pour st_centroid + * map_so_ii: suppression de message pour st_union du scope + -# git tag -a v1.0.29.0 -F dev/tag-message +# git tag -a v1.0.29.1 -F dev/tag-message # git push --tags diff --git a/so.ii/DESCRIPTION b/so.ii/DESCRIPTION index 1dc34ba3b7accdecd1f68958919d9d2b014012d6..728fd657cefda1b3a59ea4386523eb653b87a6a5 100644 --- a/so.ii/DESCRIPTION +++ b/so.ii/DESCRIPTION @@ -1,6 +1,6 @@ Package: so.ii Title: Utilities very useful to share within so_ii team -Version: 1.0.28.0 +Version: 1.0.28.1 Authors@R: c( person(given = "Frédéric", diff --git a/so.ii/R/add_bar.R b/so.ii/R/add_bar.R index 5f94c9581571a1bd4b1638da2e458b402ea651d1..a69de31c2f0415dd1a518941de24ba0f12e1cc11 100644 --- a/so.ii/R/add_bar.R +++ b/so.ii/R/add_bar.R @@ -9,6 +9,7 @@ #' @param bar_adj numeric of length 2, adjustment for text placement. #' @param bar_lon numeric of length 1, may be adjusted for some plots with #' trial-and-error strategy. +#' @param ... some unused parameters. #' #' @return NULL. #' @@ -29,7 +30,8 @@ add_bar = function( bar_d = NULL, bar_xy = NULL, bar_adj = NULL, - bar_lon = 0.4788987 + bar_lon = 0.4788987, + ... ) { d = adjust_terra_scale(bar_d) xy = calculate_terra_xy(bar_xy) diff --git a/so.ii/R/add_inset.R b/so.ii/R/add_inset.R index b6a52975d8156a283efe3d3392b590566488194e..6f3f0b07795415465fbf317792c37eac64be84c6 100644 --- a/so.ii/R/add_inset.R +++ b/so.ii/R/add_inset.R @@ -43,7 +43,7 @@ add_inset = function(x, y, ratio = 1/5, add = TRUE, ...) { diff(ext_y[c("xmin", "xmax")]) / diff(ext_x[c("xmin", "xmax")]), diff(ext_y[c("ymin", "ymax")]) / diff(ext_x[c("ymin", "ymax")]) )) - centroid = sf::st_centroid(x) + centroid = suppressWarnings(sf::st_centroid(x)) x = (x - centroid) * ratio ext_x = sf::st_bbox(x) ratio_real = stats::setNames(c( diff --git a/so.ii/R/map_so_ii.R b/so.ii/R/map_so_ii.R index 303e127f09d7af9b61c92781be817d51ca65300d..94a8753dfc4c529a584ad139a8008e83f78643fe 100644 --- a/so.ii/R/map_so_ii.R +++ b/so.ii/R/map_so_ii.R @@ -240,10 +240,12 @@ map_so_ii = function( warnings("Nothing pertinent found in scope, default value is used.") scope = so.ii::so_ii_limit } else { - scope = sf::st_union( - so.ii::so_ii_collectivity[ - so.ii::so_ii_collectivity[["commune"]] %in% scope, - ] + scope = suppressMessages( + sf::st_union( + so.ii::so_ii_collectivity[ + so.ii::so_ii_collectivity[["commune"]] %in% scope, + ] + ) ) } } diff --git a/so.ii/man/add_bar.Rd b/so.ii/man/add_bar.Rd index 6762b0877e161774377f7e1d882d4fd6cdbde2de..17f457f172bd094ba1198e54689f0c80aa30d0ca 100644 --- a/so.ii/man/add_bar.Rd +++ b/so.ii/man/add_bar.Rd @@ -5,7 +5,7 @@ \alias{add_bar} \title{Add a bar to a map} \usage{ -add_bar(bar_d = NULL, bar_xy = NULL, bar_adj = NULL, bar_lon = 0.4788987) +add_bar(bar_d = NULL, bar_xy = NULL, bar_adj = NULL, bar_lon = 0.4788987, ...) } \arguments{ \item{bar_d}{integer, size of the bar in km.} @@ -17,6 +17,8 @@ the plot.} \item{bar_lon}{numeric of length 1, may be adjusted for some plots with trial-and-error strategy.} + +\item{...}{some unused parameters.} } \value{ NULL.