Skip to content

Commit

Permalink
Merge pull request #15 from inbo/hotfix
Browse files Browse the repository at this point in the history
fit_model() gains a bucket argument when x is character
  • Loading branch information
ThierryO authored Nov 29, 2017
2 parents f70125c + deba611 commit 7d1f7b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: n2kanalysis
Title: Generic Functions to Analyse Data from the Natura 2000 Monitoring
Version: 0.2.4
Date: 2017-11-25
Version: 0.2.4.1
Date: 2017-11-29
Authors@R: c(person("Thierry", "Onkelinx", email = "[email protected]", role = c("aut", "cre")))
Description: All generic functions for the analysis. The full analysis is
defined in the analysis package of each monitoring scheme.
Expand Down
15 changes: 10 additions & 5 deletions R/fit_model_character.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' @rdname fit_model
#' @importFrom methods setMethod new
#' @importFrom assertthat assert_that is.flag noNA
#' @importFrom aws.s3 get_bucket
#' @details
#' \describe{
#' \item{\code{status}}{A vector with status levels naming the levels which should be recalculated. Defaults to \code{"new"}}
Expand All @@ -22,11 +23,15 @@ setMethod(
message(x)
}
if (is.null(dots$base)) {
dots$base <- gsub(
pattern = "(.*)/(.*)/.*/[[:xdigit:]]{40}\\.(rds|manifest)",
replacement = "\\1",
x = x
)
if (is.null(dots$bucket)) {
dots$base <- gsub(
pattern = "(.*)/(.*)/.*/[[:xdigit:]]{40}\\.(rds|manifest)",
replacement = "\\1",
x = x
)
} else {
dots$base <- get_bucket(dots$bucket)
}
}
if (is.null(dots$project)) {
dots$project <- gsub(
Expand Down

0 comments on commit 7d1f7b0

Please sign in to comment.