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

ring_calculate(, seriesID)


A matrix or array produced by ring_detect or ring_modify.


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


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


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( = t1, seg = 3, method = 'watershed')
#> Warning: The sampling year is set to the current year
#> using pdf(file="Rplots3.pdf")
#> using pdf(file="Rplots4.pdf")
#> using pdf(file="Rplots5.pdf")
## Calculate ring widths from the attribute list of t2: rw.df <- ring_calculate( = t2, seriesID = "940220")