Skip to contents

Number of sensors reading strictly above threshold in each frame.

Usage

pr_calc_loaded_count(trial, threshold = 0)

Arguments

trial

A pr_trial object.

threshold

Numeric. Cells at or below this value count as unloaded. Default 0.

Value

Integer vector of length n_frames.

Details

The count that pr_calc_mean_pressure() divides by, exposed on its own. pr_calc_loaded_rate() returns the same information as a fraction of the grid and pr_calc_contact_area() scales it by the cell area; this function keeps it as a plain cell count, which is the form the cohort summaries report because the device's cell area is unknown.

Examples

trial <- pr_example_trial("saddle_horse")
loaded <- pr_calc_loaded_count(trial)
max(loaded) <= trial$layout$n_sensors
#> [1] TRUE