Tools for vegetation analysis and forest inventory in R.
PhytoIn provides functions and example datasets for phytosociological analysis, forest inventory, biomass and carbon estimation, and visualization of vegetation data.
install.packages("PhytoIn")
# install.packages("remotes")
::install_github("PhytoIn/PhytoIn") remotes
Main features:
Structural parameters and diversity
phytoparam()
, summary.param()
,
plot.param()
Biomass and carbon
AGB()
— wrapper around BIOMASS for
above-ground biomass (AGB), C, and CO₂e
Volume stratification
stratvol()
— wood volume by DBH classes
Species accumulation and rarefaction
collector.curve()
, rarefaction()
Basal area visualization
BAplot()
— basal areas on quadrat maps (supports
rectangular plots and individual coords)
Example datasets included: quadrat.df
,
point.df
, quadrat2_plot.df
,
quadrat2_tree.df
, quadrat3_rect.df
.
Example chunks are not executed when building this README. Run them interactively.
library(PhytoIn)
<- phytoparam(
res x = quadrat.df, measure.label = "CBH", taxon = "Species",
family = "Family", su = "Plot", su.size = 25
)
summary(res) # S3 summary
plot(res) # S3 plot
head(res$param) # Taxon-level table
$global # Global metrics res
rarefaction(formula = Species ~ Plot - Morta, data = quadrat.df, plot = TRUE)
collector.curve(formula = Species ~ Plot - Morta, data = quadrat.df,
times = 1000, plot = TRUE, theme = "theme_classic")
<- AGB(
out x = quadrat.df, measure.label = "CBH", h = "h", taxon = "Species",
dead = "Morta", circumference = TRUE, su = "Plot", area = 0.0625,
rm.dead = TRUE, check.spelling = FALSE, correct.taxon = TRUE, long = TRUE
)
head(out$tree)
$taxon
out$total
out$WD.level out
Note:
AGB()
uses BIOMASS internally. Internet access is not required;
taxon standardization via TNRS is used only ifhttr2
is available.
BAplot(
formula = CBH ~ x + y, data = quadrat2_plot.df, taxon = "Species",
circumference = TRUE, quadrat.size = 5, dead = "Morta",
rm.dead = FALSE, alpha = 0.4, cex.radius = 2,
legend = TRUE, long = FALSE, ind.coord = FALSE
)
If you use PhytoIn in scientific work, please cite this package and the underlying methods (e.g., Hurlbert 1971; Heck et al. 1975; Chave et al. 2014).
citation("PhytoIn")
Issues and pull requests are welcome:
Please follow a minimal reproducible example (reprex) when reporting bugs.
GPL-3 © Rodrigo Augusto Santinelo Pereira
This README is generated from README.Rmd
. To build:
::render("README.Rmd") rmarkdown
Add to .Rbuildignore
:
^README\.Rmd$
^\.github$