ring_calculate: Generate a ring-width series

Description Usage Arguments Value Author(s) Examples

View source: R/ring_calculate.R

Description

This function can calculate ring widths according to coordinates of detected ring borders.

Usage

1
ring_calculate(ring.data, seriesID)

Arguments

ring.data

A matrix or array produced by ring_detect or ring_modify.

seriesID

A character string specifying the column name of the ring-width series.

Value

A data frame. The series ID is the column name and years are row names. The measurements units are millimeters (mm).

Author(s)

Jingning Shi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
img.path <- system.file("001.png", package = "MtreeRing")

## Read a tree ring image:
t1 <- ring_read(img = img.path, dpi = 1200)

## Split a long core sample into 3 pieces to
## get better display performance and use the
## watershed algorithm to detect ring borders:
t2 <- ring_detect(ring.data = t1, seg = 3, method = 'watershed')

## Calculate ring widths from the attribute list of t2:
rw.df <- ring_calculate(ring.data = t2, seriesID = "940220")

MtreeRing documentation built on April 20, 2021, 1:10 a.m.