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, we have an introduction. And 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.

Copy Link

Version

Install

install.packages('burnr')

Monthly Downloads

379

Version

0.3.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Steven Malevich

Last Published

January 7th, 2019

Functions in burnr (0.3.0)

fhx

Constructor for S3 fhx class.
check_duplicates

Check for duplicate observations in an fhx object.
find_recording

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

Constructor for S3 intervals class.
plot.sea

Plot a sea object.
+.fhx

Concatenate or combine two fhx objects.
plot_demograph

Create an ggplot2 object for plotting fhx demographics.
mean.intervals

Interval arithmetic mean.
print.intervals

Print an intervals objects.
is.fhx

Check if object is fhx.
median.intervals

Interval median.
composite

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

Turn character vector into factor with proper fhx levels.
get_event_years

Get years with events for an fhx object.
first_year

First (earliest) year of an fhx series.
max.intervals

Maximum interval.
pgm_meta

Metadata for the Peggy Mesa fire-history dataset
pgm_pdsi

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

Plot an fhx object.
print.sea

Print an sea objects.
count_scar

Number of scar events in an fhx series.
get_ggplot

Create a ggplot2 object for plotting.
quantile.intervals

Fit distribution quantiles.
get_series

Extract fhx observations for given series.
list_filestrings

List of character strings to write to FHX file.
lgr2_meta

Metadata for the Los Griegos Peak fire-history dataset
percent_scarred

Percent scarred time series
sort.fhx

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

Check if object is intervals.
is.sea

Check if object is sea.
summary.fhx

Summary of `fhx` object
plot.intervals

Plot an intervals object.
pgm

Peggy Mesa fire-history data
series_mean_interval

Calculate mean fire interval of a single fhx series.
series_names

Get fhx series names.
yearly_recording

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

Minimum interval.
read_fhx

Read FHX2 file and return an fhx object.
outer_type

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

Perform superposed epoch analysis.
year_range

Range of years for fhx object.
write_fhx

Write an fhx object to a new FHX2 file.
plot_intervals_dist

Basic intervals distribution plot.
plot_sealags

Basic SEA lag plot.
sample_depth

Calculate the sample depth of an fhx object
sea

Perform superposed epoch analysis.
series_stats

Generate series-level descriptive statistics.
site_stats

Generate site-level summary statistics
count_year_span

Number of years of an fhx series.
count_event_position

Count of different events
delete

Remove series or years from an fhx object.
count_recording

Number of recording years in an fhx series.
count_injury

Number of injury events in an fhx series.
get_year

Extract fhx observations for given years.
inner_type

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

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

Los Griegos Peak plot2 fire-history data