Skip to content

Commit

Permalink
cran release. gbm.auto offset param man text was cut off
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDedman committed Dec 11, 2023
1 parent ee6217a commit bcd3897
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 286 deletions.
554 changes: 277 additions & 277 deletions .Rhistory

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 2023.08.31
Date: 2023-08-31 22:57:11 UTC
SHA: 6bda7e8d110cbd641ce564230790cd5a975f7ebb
Date: 2023-09-01 16:02:09 UTC
SHA: ee6217a76f6ace8b250108daca5ed2ddc3cb59a1
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gbm.auto
Title: Automated Boosted Regression Tree Modelling and Mapping Suite
Version: 2023.08.31
Version: 2023.12.11
Authors@R: person("Simon", "Dedman", , "simondedman@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9108-972X"))
Description: Automates delta log-normal boosted regression tree abundance
prediction. Loops through parameters provided (LR (learning rate), TC
Expand Down
Binary file modified Gbm.auto_extras/Report_Statistics_Explainer_Improvements.ods
Binary file not shown.
7 changes: 5 additions & 2 deletions R/gbm.auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#' @param bf Permutations of bag fraction allowed, can be single number, vector
#' or list, per tc and lr. Defaults to 0.5.
#' @param offset Column number or quoted name in samples, containing offset values relating to the
# samples. A numeric vector of length equal to the number of cases. Similar to weighting, see
# https://towardsdatascience.com/offsetting-the-model-logic-to-implementation-7e333bc25798 .
#' samples. A numeric vector of length equal to the number of cases. Similar to weighting, see
#' https://towardsdatascience.com/offsetting-the-model-logic-to-implementation-7e333bc25798 .
#' @param n.trees From gbm.step, number of initial trees to fit. Can be
#' single or list but not vector i.e. list(fam1,fam2).
#' @param ZI Are data zero-inflated? TRUE FALSE "CHECK". Choose one. TRUE:
Expand Down Expand Up @@ -1862,6 +1862,9 @@ gbm.auto <- function(
# # byx, byy, mapmain, heatcol, mapback, landcol, lejback, legendloc, grdfun, zero, quantile, heatcolours, colournumber
# dev.off()

# BUG: stamen autozoom####
# Error in if (zoom == "auto" && location_type == "bbox") { : missing value where TRUE/FALSE needed

gbm.mapsf(predabund = grids[c(gridslat, gridslon, predabund)],
# predabundlon = 2, # Longitude column number.
# predabundlat = 1, # Latitude column number.
Expand Down
4 changes: 4 additions & 0 deletions R/gbm.loop.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
#' @return Returns a data frame of lat, long, 1 predicted abundance per loop,
#' and a final variance score per cell.
#'
#' @details
#' Thanks to a 2023 improvement to gbm.auto and gbm.loop,
#'
#'
#' @export
#' @importFrom beepr beep
#' @importFrom grDevices dev.off grey.colors png
Expand Down
4 changes: 1 addition & 3 deletions R/gbm.mapsf.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,10 @@ gbm.mapsf <- function(
if (mapsource == "gbm.basemap") {
# if user provided location of .shp file, read in. If shape is already read with st_read, leave alone.
if (is.character(shape)) shape = st_read(dsn = shape)


# autoheight <- (6 / (attr(myMap, "bb")[[4]] - attr(myMap, "bb")[[2]])) * (attr(myMap, "bb")[[3]] - attr(myMap, "bb")[[1]]) * 1.2
# if (googlemap) autoheight <- 6.4 # googlemap pulls tiles for a centre point hence will always be square. But needs a bit extra for title area.
autoheight <- 6.4 # dummy
#autoheight####
#autoheight to build####
} else { # mapsource ifelse
myMap <- ggmap::get_map(
location = myLocation, # -62.57564 28.64368 33.78889 63.68533 # stamen etc want a bounding box
Expand Down
4 changes: 3 additions & 1 deletion man/gbm.auto.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/gbm.loop.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bcd3897

Please sign in to comment.