Learn R Programming

⚠️There's a newer version (0.6.1) of this package.Take me there.

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.

A quick example

library(burnr)

data(lgr2)

plot(lgr2)

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)

Cool, eh?

See help(plot_demograph) for more plot options. You can read and write your own FHX files with read_fhx() and write_fhx().

Installation

You can install a relatively stable version of this package from CRAN by opening an R session and running:

install.packages('burnr')

You can also install the development version of the package from Github. First, be sure you have the devtools package installed in R. Install burnr with:

devtools::install_github("ltrr-arizona-edu/burnr")

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 have also an introduction. More information can be found on the project's wiki. Note, this is still under construction.

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 
(June): 9–15. https://doi.org/10.1016/j.dendro.2018.02.005.

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

Development

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

Please file bugs in the bug tracker.

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.4.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Steven Malevich

Last Published

July 9th, 2019

Functions in burnr (0.4.0)

delete

Remove series or years from an fhx object.
count_injury

Number of injury events in an fhx series.
find_recording

Subset `rings` data.frame to years that are considered recording.
composite

Composite fire events in fhx object returning composited object with prominent fires.
count_recording

Number of recording years in an fhx series.
count_year_span

Number of years of an fhx series.
count_event_position

Count of different events
check_duplicates

Check for duplicate observations in an fhx object.
fhx

Constructor for S3 fhx class.
count_scar

Number of scar events in an fhx series.
intervals

Constructor for S3 intervals class.
is.fhx

Check if object is fhx.
outer_type

Type of observation in the last (most recent) year of an fhx series.
is.sea

Check if object is sea.
is.intervals

Check if object is intervals.
min.intervals

Minimum interval.
plot_sealags

Basic SEA lag plot.
list_filestrings

List of character strings to write to FHX file.
plot_intervals_dist

Basic intervals distribution plot.
lgr2_meta

Metadata for the Los Griegos Peak fire-history dataset
get_ggplot

Create a ggplot2 object for plotting.
first_year

First (earliest) year of an fhx series.
inner_type

Type of observation in the first (earliest) year of an fhx series.
get_year

Extract fhx observations for given years.
sample_depth

Calculate the sample depth of an fhx object
plot.fhx

Plot an fhx object.
percent_scarred

Percent scarred time series
last_year

Last (most recent) year of an fhx series.
get_event_years

Get years with events for an fhx object.
pgm

Peggy Mesa fire-history data
get_series

Extract fhx observations for given series.
make_rec_type

Turn character vector into factor with proper fhx levels.
series_mean_interval

Calculate mean fire interval of a single fhx series.
pgm_meta

Metadata for the Peggy Mesa fire-history dataset
max.intervals

Maximum interval.
pgm_pdsi

Reconstructed PDSI time series for the Peggy Mesa fire-history dataset
sea

Perform superposed epoch analysis.
series_names

Get fhx series names.
print.sea

Print an sea objects.
yearly_recording

Count the number of recording series for each year in an fhx object.
plot.intervals

Plot an intervals object.
print.intervals

Print an intervals objects.
+.fhx

Concatenate or combine two fhx objects.
mean.intervals

Interval arithmetic mean.
sort.fhx

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

Interval median.
summary.fhx

Summary of `fhx` object
series_stats

Generate series-level descriptive statistics.
quantile.intervals

Fit distribution quantiles.
site_stats

Generate site-level summary statistics
read_fhx

Read FHX2 file and return an fhx object.
write_fhx

Write an fhx object to a new FHX2 file.
plot.sea

Plot a sea object.
lgr2

Los Griegos Peak plot2 fire-history data
plot_demograph

Create an ggplot2 object for plotting fhx demographics.
run_sea

Perform superposed epoch analysis.
year_range

Range of years for fhx object.