Basic tools to analyze forest fire history data (e.g. FHX) in R.
Basic tools to analyze forest fire history data (e.g. FHX2) in R. This is designed for power users and projects with special needs.
The project is under heavy development. Hic sunt dracones.
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)
help(plot_demograph) for more plot options. You can read and write your own FHX files with
You can install a relatively stable version of this package from CRAN with:
You can also install the development version of the package from Github. First, be sure you have the
devtools package installed in R. Install
Please file bugs in the bug tracker.
Changes in this patch:
Added option to sort series by their last (or most recent) year with
run_sea() to better replicate EVENT Fortran program. Addresses #58. Added detailed description and an example page with graphics. Also fixed issue with percentage CIs in the departure table. Mind you,
run_sea() is still super experimental.
Several minor changes to documentation and meta data.
Changes in this minor release:
Added a vignette!
get_ggplot() is being depreciated. Please use
Changed design of fhx objects. They are now data.frame and not lists (nobody used the 'meta', list member anyways). This means that if x is your fhx object and you previously used x$rings, you can now just use x.
pgm example data.
composite() now returns an fhx object.
Added function get_event_years() to find fire and fire injury years in fhx objects. This is especially helpful for composites.
combine() were reverted back to '+' at the request of beloved users. This means code like
lgr2 + pgm will combine these objects together into a single fhx object!
Added examples to all function documentation.
resolve_duplicates() is now hidden (i.e.
Added function sample_depth() to get sample depth.
Added run_sea function to begin to address issue #58. Has pretty table output. This is still very experimental.
Bug fix in series_stats to maintain series IDs for those with no features
Changed composite() behavior. Now more similar to FHAES. Can choose to count injuries as "fire events" with the injury_event argument.
Added count_recording() function.
Fixed minor bugs in series_stats.
Removed sorting by default on read_fhx() and '+.fhx'
Fixed sort()s non-responsive decreasing argument.
Fixed poor sorting function for FHX objects.
Added several small utility functions:
Adding series_stats function, closes issue #44.
Changes in this patch:
get_ggplot() should no longer allow the user to plot facets and composite rugs in the same plot. This closes bug #25.
Ring types (the
rec_type column in
x$rings) has "." in all levels replaced with a "_". For example, 'dormant.fs' is now 'dormant_fs.' Closes #45.
legend argument is now
plot_legend to avoid clash with common functions.
fhx$rings and all functions,
type arugment is now
rec_type to avoid clash with
rec_type is short for "record_type".
Can now read FHX files with a single series (closes bug #43).
pgm are available fire-history datasets when you load this package. The metadata for each of these sets is
pgm_meta. Load the data with
First github release
NEWS.md file. Existing users should check back here for changes.
rug.filter function is renamed
ggplot.fhx is now
get_ggplot. This is more descriptive. The following arguments for this function have been changed as a part of this fix:
plot.rug is now
filter.min is now
filter.prop is now
event.size is now
rugbuffer.size is now
rugdivide.pos is now
spp argument is renamed to
sppid is now
cluster is now
clusterid is now
read.fhx function is renamed
write.fhx function is renamed
order.fhx is now
sort (see method
sort.fhx). Also, added a boolean argument
decreasing, which defaults to FALSE. Previously this has been TRUE..
fhx objects, (
+.fhx) is now
a + b should now be
Fixed bug that disappeared a series which started or ended with fire scars.