smalianwb: Calculate the volume with bark of trees using the Smalian...

View source: R/smalianwb.R

smalianwbR Documentation

Calculate the volume with bark of trees using the Smalian method

Description

Function used to calculate the volume with bark of trees using the Smalian method. This function has integration with dplyr, so it can be used inside a pipe, along with the group_by function.

Usage

smalianwb(
  df,
  di,
  hi,
  tree,
  .groups = NA,
  di_mm_to_cm = FALSE,
  hi_cm_to_m = FALSE
)

Arguments

df

A data frame.

di

Quoted name of the section diameter variable, in centimeters.

hi

Quoted name of the section height variable, in meters

tree

Quoted name of the tree variable. used to differentiate the trees' sections. If this argument is NA, the defined groups in the data frame will be used

.groups

Optional argument. Quoted name(s) of additional grouping variables that can be added to differentiate subdivisions of the data. If this argument is not supplied, the defined groups in the data frame will be used. Default: NA.

di_mm_to_cm

Boolean argument that, if TRUE, converts the di argument from milliliters to centimeters. Default: FALSE.

hi_cm_to_m

Boolean argument that, if TRUE, converts the hi argument from centimeters to meters. Default: FALSE.

Value

Data frame with volume values by section.

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

References

Campos, J. C. C. and Leite, H. G. (2017) Mensuracao Florestal: Perguntas e Respostas. 5a. Vicosa: UFV.

See Also

Complementary functions: smalianwob, For calculation of volume without bark using the Smalian method, huberwb, for calculation of volume with bark using the Huber method, huberwob, for calculation of volume without bark the Huber method.

Examples

library(forestmangr)
data("exfm7")
head(exfm7)

# Calculate the volume with bark using the Smalian method:
smalianwb(exfm7,"di_wb", "hi", "TREE")

# Using pipes:
library(dplyr)

 exfm7 %>% 
 group_by(TREE) %>% 
 smalianwb("di_wb", "hi")


forestmangr documentation built on Sept. 15, 2024, 1:06 a.m.