MyNixOS website logo
Description

Calculate Wood Volumes from Taper Functions.

Functions for estimation of wood volumes, number of logs, diameters along the stem and heights at which certain diameters occur, based on taper functions and other parameters. References: McTague, J. P., & Weiskittel, A. (2021). <doi:10.1139/cjfr-2020-0326>.

timbeR

CRAN_Status_Badge

The goal of timbeR is to provide functions for estimating log volumes and quantities from taper functions in the processing of forest inventories.

Installation

You can install the CRAN version of the package as follows:

install.packages("timbeR")

You can also install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("sergiocostafh/timbeR")

Example

As a basic example, we can fit a 5th degree polynomial to the tree_scaling dataset.

library(dplyr)
library(timbeR)

tree_scaling <- tree_scaling %>% 
  mutate(did = di/dbh,
         hih = hi/h)

poli5 <- lm(did~hih+I(hih^2)+I(hih^3)+I(hih^4)+I(hih^5),tree_scaling)

And then we define the wood products:

assortments <- data.frame(
  NAME = c('15-25','4-15'),
  SED = c(15,4),
  MINLENGTH = c(2.65,2),
  MAXLENGTH = c(2.65,4.2),
  LOSS = c(5,5)
)

And now we can estimate the volume and quantity of wood products in a tree stem. For ease of understanding, let’s simulate cutting logs on a single tree.

# Tree measurements
dbh <- 25
h <- 20

# Estimate logs volume and quantity
poly5_logs(dbh, h, coef(poli5), assortments)
#> $volumes
#> # A tibble: 1 x 2
#>   `15-25` `4-15`
#>     <dbl>  <dbl>
#> 1   0.293  0.111
#> 
#> $logs
#> # A tibble: 1 x 2
#>   `15-25` `4-15`
#>     <dbl>  <dbl>
#> 1       3      2

Finally, we can generate the same result in a visual way, simulating the position of the logs along the tree stem.

poly5_logs_plot(dbh, h, coef(poli5), assortments)
Metadata

Version

2.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows