Learn R Programming

burnr

Basic tools to analyze forest fire history data (e.g. FHX) in R. This is designed for power users and projects with special needs.

Installation

You can install the released version of burnr from CRAN with:

install.packages("burnr")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ltrr-arizona-edu/burnr")

Example

This is a basic example which shows you how to solve a common problem:

library(burnr)

# This gives you a basic plot. There are more advanced options. For example, we can color our plot by sample species.

data(lgr2_meta)

plot(lgr2,
  color_group = lgr2_meta$SpeciesID,
  color_id = lgr2_meta$TreeID,
  plot_legend = TRUE
)

Support

Documentation is included in the code. If you’re new to burnr, our 2018 paper in Dendrochronologia is a nice survey of the package with many examples. We also have instructional vignettes on the project website, https://ltrr-arizona-edu.github.io/burnr/. And you can work through examples, with included data, in an R project hosted by @chguiterman on GitHub: https://github.com/chguiterman/burnr_demo. We’re working to enhance our instruction and add to these demos on the burnr website, so please send us requests for new tips and tricks, or create your own and share with us!

Citation

Please cite the original burnr paper if you use it in your research:

Malevich, Steven B., Christopher H. Guiterman, and Ellis Q. Margolis (2018) Burnr: Fire History Analysis and Graphics in R. Dendrochronologia 49: 9–15. DOI: 10.1016/j.dendro.2018.02.005.

Citations help us to identify user needs and justify additional time developing and maintaining burnr.

Development

Please file bugs in the bug tracker.

Want to contribute? Great! We’re following Hadley’s packaging workflow and style guide. Fork away.

If you’re not a developer, don’t worry! We also welcome help with documentation and tutorials.

Copy Link

Version

Install

install.packages('burnr')

Monthly Downloads

367

Version

0.6.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Steven Malevich

Last Published

March 1st, 2022

Functions in burnr (0.6.1)

count_event_position

Count different events in an fhx object
composite

Composite fire events in fhx object
count_year_span

Number of years of an fhx object
count_scar

Number of scar events in an fhx object
is.fhx

fhx

Constructor for fhx objects
delete

Remove series or years from an fhx object
is.intervals

first_year

First (earliest) year of an fhx object
get_event_years

Get years with events for an fhx object
plot.intervals

Plot a fire intervals object
plot.sea

Plot a sea object
count_injury

Number of injury events in an fhx object
plot_sealags

Basic SEA lag plot of sea object
+.fhx

Concatenate or combine two fhx objects
median.intervals

Fire intervals median
get_year

Extract fhx observations for given years
count_recording

Number of recording years in an fhx object
get_series

Extract fhx observations for given series
as.fhx

max.intervals

Maximum interval in fire intervals
sea

Perform superposed epoch analysis
min.intervals

Minimum interval in fire intervals
pgm_pdsi

Reconstructed PDSI time series for the Peggy Mesa fire-history dataset
plot.fhx

Plot an fhx object
is_intervals

Check if object is fire intervals
is_sea

Check if object is sea
as_fhx

Cast data frame or list-like to fhx object
mean.intervals

Fire intervals arithmetic mean
intervals

Calculate fire intervals from a composite
inner_type

Type of observation in the first (earliest) year of an fhx object
plot_demograph

Create an ggplot2 object for plotting fhx demographics
plot_intervals_dist

Basic fire intervals distribution plot
pgm_meta

Metadata for the Peggy Mesa fire-history dataset
last_year

Last (most recent) year of an fhx object
pgm

Peggy Mesa fire-history data
is.sea

series_names

Get fhx series names
pme

Pajarito Mountain East fire-history data
pmr

Pajarito Mountain Ridge fire-history data
series_mean_interval

Calculate quick mean fire interval of an fhx object with single series
lgr2

Los Griegos Peak plot2 fire-history data
series_stats

Generate series-level descriptive statistics for fhx object
print.sea

Print a sea object.
summary.fhx

Summary of fhx object
sort.fhx

Sort the series names of fhx object by the earliest or latest year
quantile.intervals

Fit distribution quantiles to fire intervals
yearly_recording

Count the number of recording series for each year in an fhx object
outer_type

Type of observation in the last (most recent) year of an fhx object
percent_scarred

Percent scarred time series for fhx object
pmw

Pajarito Mountain West fire-history data
is_fhx

Check if object is fhx.
print.intervals

Print a fire intervals object
write_fhx

Write an fhx object to a new FHX2 file
lgr2_meta

Metadata for the Los Griegos Peak fire-history dataset
year_range

Range of years in an fhx object
make_rec_type

Turn character vector into factor with proper fhx levels
read_fhx

Read FHX2 file and return an `fhx`` object
sample_depth

Calculate the sample depth of an fhx object