Skip to content

Introduce plot_regen_proportion() function for regeneration proportion and DBH checks#22

Merged
ianmseddy merged 12 commits intoianmseddy:developmentfrom
pkalanta:development
Mar 2, 2026
Merged

Introduce plot_regen_proportion() function for regeneration proportion and DBH checks#22
ianmseddy merged 12 commits intoianmseddy:developmentfrom
pkalanta:development

Conversation

@pkalanta
Copy link
Copy Markdown
Contributor

@pkalanta pkalanta commented Jan 5, 2026

This pull request introduces the plot_regen_proportion() function.
The function:

  • Computes regeneration proportions by MeasureID, plot, and source
  • Identifies partial and high regeneration measurements
  • Produces a histogram of regeneration proportions by source
  • Computes elapsed time between measurements
  • Evaluates DBH growth against expected values and flags implausible growth

@ianmseddy
Copy link
Copy Markdown
Owner

Hi Parvin - can you remove the histogram and ggplot changes, and then regenerate the documentation for the package?
In addition, rather than use that sapply line to generate the previous year, you can do this

plotShift <- unique(DT[, .(OrigPlotID1, MeasureID, MeasureYear)])
  setkey(plotShift, OrigPlotID1, MeasureYear)
  plotShift[, previousMsrYear := shift(MeasureYear, n = 1), .(OrigPlotID1)]

It will return the previous MeasureYear, NA if there is none.

@ianmseddy ianmseddy merged commit 802d919 into ianmseddy:development Mar 2, 2026
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants