calc_change_cumu: Calculate Cumulative Change at a SET

View source: R/calc_change_cumu.R

calc_change_cumuR Documentation

Calculate Cumulative Change at a SET

Description

Calculate Cumulative Change at a SET

Usage

calc_change_cumu(dat)

Arguments

dat

a data frame with one row per pin reading, and the following columns, named exactly: date, set_id, arm_position, pin_number, pin_height

Value

a list of three tibbles: one each for pin, arm, and set level calculations. Pin level change is calculated first, as the difference between a pin reading and the reading from the earliest date at that set_id–arm–pin. If the first reading was NA, the entire pin's cumulative readings will be NA. The column name in the $pin tibble is "cumu". For every date of a pin reading, this calculated value will exist. On the first date, it is 0. Cumulative pin changes are then averaged to the arm position level on each date, excluding NAs. St Deviation and St Error are also calculated. There is one calculated value for every arm on every reading date. These columns in the $arm tibble are "mean_cumu", "sd_cumu", and "se_cumu". The cumulative arm changes are then averaged to the SET level, also with st dev and st err. There is one calculated value for every SET on every reading date. The columns in the $set tibble are again "mean_cumu", "sd_cumu", and "se_cumu".

Examples

calc_change_cumu(example_sets)


swmpkim/SETr documentation built on May 6, 2024, 11:15 p.m.