Skip to content

Commit

Permalink
Merge pull request #128 from brews/docstyle
Browse files Browse the repository at this point in the history
Various small fixes to documentation
  • Loading branch information
brews committed Jul 8, 2019
2 parents a3c5a7a + 77d74f3 commit 9a69667
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 41 deletions.
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

Changes in this release:

* `read_fhx()` is more tolerant of extra whitespace in series names.
* `read_fhx()` is more tolerant of extra whitespace in series names. Thanks to Chris Guiterman for adding this.

* Fixed documentation examples not rendering for `sea()` (Issue #125).

* Minor argument clarification in `composite()` documentation (Issue #127).


# burnr v0.3.1

Expand Down
43 changes: 17 additions & 26 deletions R/sea.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,24 @@ run_sea <- function(x, key, years_before=6, years_after=4,
#' \dontrun{
#' # Read in the Cook and Krusic (2004; The North American Drought Atlas) reconstruction
#' # of Palmer Drought Severity Index (PDSI) for the Jemez Mountains area (gridpoint 133).
# ' target_url <- paste0('http://iridl.ldeo.columbia.edu',
# ' '/SOURCES/.LDEO/.TRL/.NADA2004',
# ' '/pdsiatlashtml/pdsiwebdata/1050w_350n_133.txt')
# ' pdsi <- read.table(target_url, header = TRUE, row.names = 1)
# ' pdsi <- subset(pdsi, select = "RECON")
# '
# ' # Run SEA on Peggy Mesa (pgm) data
# ' data(pgm)
# ' pgm_comp <- composite(pgm)
# '
# ' pgm_sea <- sea(pdsi, pgm_comp)
# '
# ' # See basic results:
# ' print(pgm_sea)
# '
# ' # Basic plot:
# ' plot(pgm_sea)
#' }
#' \dontrun{
#' # For users who want to perform SEA very near to EVENT.exe and/or have reproducable draws from
#' # the bootstrap procedure, consider including the \code{set.seed} function prior to \code{run_sea}.
#' # Convention is to provide a long integer, such as a birthday (e.g. 3191982).
#' # In the EVENT.exe program, Richard Holmes used the number of days since 1 January 1935.
#' days <- as.numeric(Sys.Date() - as.Date("1jan1935", "%d%b%Y"))
#' set.seed(days)
#' }
#' target_url <- paste0('http://iridl.ldeo.columbia.edu',
#' '/SOURCES/.LDEO/.TRL/.NADA2004',
#' '/pdsiatlashtml/pdsiwebdata/1050w_350n_133.txt')
#' pdsi <- read.table(target_url, header = TRUE, row.names = 1)
#' pdsi <- subset(pdsi, select = "RECON")
#'
#' # Run SEA on Peggy Mesa (pgm) data
#' data(pgm)
#' pgm_comp <- composite(pgm)
#'
#' pgm_sea <- sea(pdsi, pgm_comp)
#'
#' # See basic results:
#' print(pgm_sea)
#'
#' # Basic plot:
#' plot(pgm_sea)
#' }
#' @export
sea <- function(x, event, nbefore=6, nafter=4, event_range=TRUE, n_iter=1000) {
if (is.fhx(event)){
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ yearly_recording <- function(x, injury_event=FALSE) {
#' Composite fire events in fhx object returning composited object with prominent fires.
#'
#' @param x An fhx instance.
#' @param filter_prop The proportion of fire events to recording series needed in order to be considered. Default is 0.25.
#' @param filter_prop The minimum proportion of fire events to recording series needed in order to be considered. Default is 0.25.
#' @param filter_min_rec The minimum number of recording series needed to be considered a fire event. Default is 2 recording series.
#' @param filter_min_events The minimum number of fire scars needed to be considered a fire event. Default is 1. This includes injuries if injury_event=TRUE.
#' @param injury_event Boolean indicating whether injuries should be considered events. Default is FALSE.
Expand Down
1 change: 1 addition & 0 deletions burnr.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
LineEndingConversion: Posix

BuildType: Package
PackageUseDevtools: Yes
Expand Down
2 changes: 1 addition & 1 deletion man/composite.Rd

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

4 changes: 2 additions & 2 deletions man/list_filestrings.Rd

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

2 changes: 1 addition & 1 deletion man/read_fhx.Rd

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

26 changes: 17 additions & 9 deletions man/sea.Rd

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

0 comments on commit 9a69667

Please sign in to comment.