Description Usage Arguments Value References Examples
Some occurrences in the model results can lead the CumDY function to detect extra year transitions, resulting in sudden jumps in the shell chronology or a start of the chronology at an age beyond 1 year. This function removes these sharp transitions and late onset by adding or subtracting whole years to the age result.
1 |
resultarray |
Array containing the full results of the optimized growth model |
T_per |
The period length of one year (in days) |
plot |
Should the results be plotted? (/codeTRUE/FALSE) |
agecorrection |
Correct for jumps in age (/codeTRUE) or only for starting time (/codeFALSE) |
An updated and corrected version of resultarray
package dependencies: ggplot2 3.2.1
1 2 3 4 5 6 7 8 9 10 11 | testarray <- array(NA, dim = c(20, 16, 9)) # Create empty array
# with correct third dimension
windowfill <- seq(10, 100, 10) # Create dummy simulation data
# (ages) to copy through the array
for(i in 6:length(testarray[1, , 1])){
testarray[, i, 3] <- c(windowfill,
rep(NA, length(testarray[, 1, 3]) - length(windowfill)))
windowfill <- c(NA, windowfill + 31)
}
testarray2 <- age_corr(testarray, 365, FALSE, FALSE) # Apply function on
array
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.