Package 'rForest'

Title: Forest Inventory and Analysis
Description: Set of tools designed for forest inventory analysis.
Authors: Carlos Alberto Silva [aut, cph, cre], Carine Klauberg [aut] (Reviews the documentation), Samuel P. C. Carvalho [aut], Manoela de O. Rosa [aut], Joao P. S. Madi [aut], Caio Hamamura [aut] (Maintenance and review)
Maintainer: Carlos Alberto Silva <[email protected]>
License: GPL (>=2)
Version: 0.1.4
Built: 2025-02-18 03:55:44 UTC
Source: https://github.com/carlos-alberto-silva/rForest

Help Index


Forest Inventory Data - Example 01

Description

Forest inventory data collected in Eucalyptus spp. forest plantations. This is an example of forest inventory data used in poly5Model, plotStem2d and plotStem3d functions

Format

A data frame with 131 rows and 5 variables

Details

  • id. unique number to identify tree information

  • hi. height (m) of each section where diameter is taken

  • di. diameter (cm) in hi

  • ht. total height (m) of the tree

  • dbh. diameter (cm) at breast height (e.g 1.30 m)


2D visualization of tree stems

Description

plotStem3d is used to visualize tree stems in 3D

Usage

plotStem2d(hi,di,col)

Arguments

hi

vector of measured tree i heights

di

vector of measured tree diameters (di) at i heights

col

stem color, e.g. "chocolate"

Value

Nothing, but outputs a plot

Author(s)

Carlos A. Silva

Examples

# Importing forest inventory data
data(ForestInv01) 

# Subsetting Tree 1
tree1<-subset(ForestInv01,ForestInv01[,1]==1)
hi<-tree1$hi
di<-tree1$di

# Plotting stem 2d
plotStem2d(hi,di, col="forestgreen")

3D visualization of tree stems

Description

plotStem3d is used to visualize tree stems in 3D

Usage

plotStem3d(hi,di,col,alpha)

Arguments

hi

vector of trees his

di

vector of trees dis

col

stem color, e.g. "chocolate"

alpha

stem transparency. Set a value from 0 to 1

Value

Nothing, but outputs a plot

Author(s)

Carlos Alberto Silva

Examples

# Importing forest inventory data
data(ForestInv01) 

# Subsetting Tree 1
tree1<-subset(ForestInv01,ForestInv01[,1]==1)
hi<-tree1$hi
di<-tree1$di

# Plotting stem 3d
plotStem3d(hi,di,alpha=1,col="forestgreen")

Fitting a fifth-degree polynomial taper model

Description

poly5Model is used to fit a fifth-degree polynomial taper model

Usage

poly5Model(dbh,ht,di,hi, plotxy)

Arguments

dbh

vector of diameter at breast height

ht

vector of measured tree heights

di

vector of measured tree diameters at i heights

hi

vector of measured tree i heights

plotxy

plot the fitted model

Value

Returns a fifth-degree polynomial taper model as an object of class "lm"

Author(s)

Carlos A. Silva, Samuel P. C. Carvalho, Carine Klauberg Silva and Manoela de O. Rosa

References

Schoepfer (1966) model :fifth-degree polynomial taper model

di/dbh=(hi/ht)+(hi/ht)2+(hi/ht)3+(hi/ht)4+(hi/ht)5di/dbh= (hi/ht) + (hi/ht)^2 + (hi/ht)^3 + (hi/ht)^4 + (hi/ht)^5

Examples

# Importing forest inventory data
data(ForestInv01) 

# setting model parametersdbh and ht
hi<-ForestInv01[,2]
di<-ForestInv01[,3]
ht<-ForestInv01[,4]
dbh<-ForestInv01[,5]

# fitting the fifth-degree polynomial taper model
fit <- poly5Model(dbh,ht,di,hi, plotxy=TRUE)
#grid()

3-D visualization of taper models

Description

VisTaperShape3d is used for visualizing taper models in 3-D

Usage

VisTaperShape3d(model,dbh,height,col, solid)

Arguments

model

taper model as an object of class "lm"

dbh

tree diameter at breast height, e.g. 35 cm

height

tree height, e.g. 25 m

col

taper color, e.g. "forestgreen"

solid

if TRUE (default) returns a solid 3d model. If FALSE, returns a 3d grid model

Value

Nothing, but outputs a plot

Author(s)

Carlos Alberto Silva and Joao Paulo Sardo Madi

Examples

# Importing forest inventory data
data(ForestInv01) 

# setting model parametersdbh and ht
hi<-ForestInv01[,2]
di<-ForestInv01[,3]
ht<-ForestInv01[,4]
dbh<-ForestInv01[,5]

# fitting the fifth-degree polynomial taper model
fit <- poly5Model(dbh,ht,di,hi, plotxy=TRUE)

dbh<-30 # cm
height<-25 # m
model<-fit

library(rgl)
# Plotting the taper model in 3-D
VisTaperShape3d(fit,dbh,height,col="forestgreen",solid=TRUE)
box3d()
grid3d(c("x+","y+"))
aspect3d(0.3,0.3,1)