knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "figure/",
  fig.height = 1
)

forestr

The forestr package calculates forest structure and canopy structure metrics from multiple data forms, including two-dimensional portable canopy LiDAR (PCL) raw data files and from certain processed three-dimensional terrestrial LiDAR scanner (TLS) data forms.

Installation

To install version 1.0.1 which is on CRAN

install_packages("forestr")

To install the development version

devtools::install_github("atkinsjeff/forestr")

Usage

To process raw PCL data, which comes in .csv form as two columns: column one is a string of numbers that represent return distance in meters, and column two is a string of integers that represent return intensity.

You can run an example data set that is included, a 40 m forest transect from Ordway-Swisher Biological Station in Hawthorn, FL.

The process_pcl function writes data to an output folder that is created in the working directory.

require(forestr)

process_pcl(osbs, save_output = FALSE)

The output includes:

1) an output.csv file that contains 24 canopy structral complexity (CSC) metrics including rumple, canopy rugosity, and max canopy height. These metrics are defined in Hardiman et al. 2013 and in Atkins et al. (In review at Methods in Ecology and Evolution.

2) an output_hit_matrix.csv file that is a file that contains the adjusted VAI by x and z position in the canopy.

3) a summary_matrix.csv file that gives the mean height, max heights, VAI and variance metrics by each columnar position, or x position along the transect.

Plotting

The forestr package also produces hit grids--vegetation area index (VAI) for by 1 squared meter bins on the x and z axis through the canopy.

Worked Example

Let's do a complete run using data from a red pine plantation in Michigan. These data are saved in the data folder as red_pine.rda in the master GitHub directory and can be accessed as red_pine and processed as such where we will look at all of the optional parameters:

red_pine <- "https://raw.githubusercontent.com/atkinsjeff/forestr/master/data-raw/red_pine_plain1.CSV"
forestr::process_pcl(red_pine, user_height = 1.05, marker.spacing = 10, max.vai = 8, pavd = TRUE, hist = TRUE, output.file = TRUE )

Running the following command produces the following output to the console:



atkinsjeff/forestr documentation built on Dec. 12, 2023, 5:36 a.m.