forestmangr
An R package for forest mensuration and management.
https://github.com/sollano/forestmangr
Category: Biosphere
Sub Category: Forest Observation and Management
Last synced: about 13 hours ago
JSON representation
Repository metadata
R package for forest mensuration and management
- Host: GitHub
- URL: https://github.com/sollano/forestmangr
- Owner: sollano
- License: other
- Created: 2018-10-08T19:59:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-01T23:10:29.000Z (about 1 year ago)
- Last Synced: 2025-11-27T18:47:10.468Z (about 1 month ago)
- Language: R
- Size: 1.09 MB
- Stars: 17
- Watchers: 1
- Forks: 8
- Open Issues: 2
- Releases: 4
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
README.Rmd
---
output: github_document
---
```{r, echo = FALSE, message=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
library(forestmangr)
library(dplyr)
```
[](https://travis-ci.org/sollano/forestmangr)
[](https://cran.r-project.org/package=forestmangr)
[](https://codecov.io/gh/sollano/forestmangr?branch=master)
[](https://cran.r-project.org/package=forestmangr)
[](https://cran.r-project.org/package=forestmangr)
[](https://www.repostatus.org/#active)
# forestmangr
Processing forest inventory data with methods such as simple random sampling, stratified random sampling and systematic sampling. There are also functions for yield and growth predictions and model fitting, linear and non linear grouped data fitting, and statistical tests.
If you need any help, I’m available for consulting. If you find forestmangr useful, please consider supporting my efforts in developing this open-source R package for the forestry community!
## Installation
To install the stable CRAN version, use:
```{r eval = FALSE}
install.packages("forestmangr")
```
Or you can install forestmangr from github, for the latest dev version with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("sollano/forestmangr")
```
## Example
```{r}
library(forestmangr)
library(dplyr)
data("exfm16")
head(exfm16)
```
Now, we can fit a model for Site estimatation. With `nls_table`, we can fit a non-linear model, extract it's coefficients, and merge it with
the original data in one line. Here we'll use Chapman & Richards model:
```{r}
age_i <- 64
exfm16_fit <- exfm16 %>%
nls_table(DH ~ b0 * (1-exp(-b1* age))^b2, mod_start = c( b0=23, b1=0.03, b2 = 1.3), output="merge") %>%
mutate(site = DH *( ( (1- exp( -b1/age ))^b2 ) / (( 1 - exp(-b1/age_i))^b2 ))) %>%
select(-b0,-b1,-b2)
head(exfm16_fit)
```
Now, to fit Clutter's model, we can use the `fit_clutter` function, indicating the DH, B, V, site and Plot variable names:
```{r}
coefs_clutter <- fit_clutter(exfm16_fit, "age", "DH", "B", "V", "site", "plot")
coefs_clutter
```
Now, say we wanted to do a Simple Random Sampling Forest Inventory, with 20% as an accepted error.
First, let's load the package and some data:
```{r}
library(forestmangr)
data("exfm2")
data("exfm3")
data("exfm4")
head(exfm3,10)
```
First we should try a pilot inventory, to see if the number of plots sampled is enough for reaching the desired error:
```{r}
sprs(exfm3, "VWB", "PLOT_AREA", "TOTAL_AREA", error = 20, pop = "fin")
```
We can see that we have 10 plots, but 15 more are needed if we want a minimum of 20% error.
The exfm4 data has new samples, that we now can use to run a definitive inventory:
```{r}
sprs(exfm4, "VWB", "PLOT_AREA", "TOTAL_AREA", error = 20, pop = "fin")
```
The desired error was met.
The exfm2 data has a strata variable. Say we wanted to run a SRS inventory for every stand. We can do this with the .groups argument:
```{r}
head(exfm2,10)
sprs(exfm2, "VWB", "PLOT_AREA", "STRATA_AREA",.groups="STRATA", error = 20, pop = "fin")
```
We can also run a stratified random sampling inventory with this data:
```{r}
strs(exfm2, "VWB", "PLOT_AREA", "STRATA_AREA", "STRATA", error = 20, pop = "fin")
```
## Citation
To cite this package in publications, use:
ABNT:
BRAGA S. R.; OLIVEIRA, M. L. R.; GORGENS, E. B. forestmangr: Forest Mensuration and Management. R package version 0.9.2, 2020. Disponível em:
APA:
Sollano Rabelo Braga, Marcio Leles Romarco de Oliveira and Eric Bastos Gorgens (2020). forestmangr: Forest Mensuration and Management. R package version 0.9.2. https://CRAN.R-project.org/package=forestmangr
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Acknowledgments
* This project was developed on the Forest Management Lab, DEF, UFVJM, Diamantina/Minas Gerais - Brazil.
* This project came to be as a mean to make the life of a forestry engeneer a little easier and pratical.
We'd like to thank everyone at UFVJM that has in anyway helped this project grow.
* We'd like to thank UFVJM, FAPEMIG, CNPq e CAPES for the support.
Owner metadata
- Name: Sollano Rabelo Braga
- Login: sollano
- Email:
- Kind: user
- Description: Forest Engeneer
- Website: https://sites.google.com/view/forestsuite/home
- Location: Três Marias, Minas Gerais - Brasil
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/19754326?u=2dc3a135983747aca5ec6e9fac9a6ab23702dc2a&v=4
- Repositories: 1
- Last ynced at: 2024-06-11T16:00:08.053Z
- Profile URL: https://github.com/sollano
GitHub Events
Total
- Watch event: 1
- Push event: 4
- Fork event: 1
Last Year
- Fork event: 1
Committers metadata
Last synced: 6 days ago
Total Commits: 211
Total Committers: 1
Avg Commits per committer: 211.0
Development Distribution Score (DDS): 0.0
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Sollano | s****b@g****m | 211 |
Issue and Pull Request metadata
Last synced: 4 months ago
Total issues: 2
Total pull requests: 3
Average time to close issues: N/A
Average time to close pull requests: about 1 hour
Total issue authors: 2
Total pull request authors: 2
Average comments per issue: 3.0
Average comments per pull request: 0.67
Merged pull request: 1
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- m1mels73 (1)
- bharaticg (1)
Top Pull Request Authors
- sollano (2)
- hadley (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- cran: 846 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 9
- Total maintainers: 1
cran.r-project.org: forestmangr
Forest Mensuration and Management
- Homepage: https://github.com/sollano/forestmangr#readme
- Documentation: http://cran.r-project.org/web/packages/forestmangr/forestmangr.pdf
- Licenses: MIT + file LICENSE
- Latest release: 0.9.8 (published about 1 year ago)
- Last Synced: 2025-12-22T15:09:50.257Z (8 days ago)
- Versions: 9
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 846 Last month
-
Rankings:
- Forks count: 7.999%
- Downloads: 10.579%
- Stargazers count: 14.171%
- Average: 16.98%
- Dependent repos count: 24.3%
- Dependent packages count: 27.852%
- Maintainers (1)
Dependencies
- R >= 3.5 depends
- FinCal * imports
- broom * imports
- car * imports
- dplyr >= 0.7.0 imports
- ggdendro * imports
- ggplot2 >= 2.0 imports
- ggpmisc * imports
- ggthemes * imports
- gridExtra * imports
- magrittr * imports
- methods * imports
- miniUI * imports
- minpack.lm * imports
- plyr * imports
- purrr * imports
- rlang * imports
- scales * imports
- shiny * imports
- stats * imports
- systemfit * imports
- tibble >= 3.0.0 imports
- tidyr * imports
- utils * imports
- formattable * suggests
- knitr * suggests
- rmarkdown * suggests
- tidyselect * suggests
Score: 9.687319614958344