bin_average | R Documentation |
Calculate averages for variables by depth or pressure bin.
bin_average(
x,
by = "depth",
bin_width = 1,
exclude_surface = 0.5,
exclude_bad_flag = TRUE,
interpolate_missing = TRUE,
missing_latitude = 55
)
x |
ctd object |
by |
Grouping variable as a character vector ("depth" or "pressure") |
bin_width |
Width of bins to use for binning. |
exclude_surface |
Depth or pressure (down is positive) as numeric vector (1L). Scans will be excluded from binning if they are shallower this threshold. |
exclude_bad_flag |
Logical indicating whether to remove scans with a bad (negative) flag. |
interpolate_missing |
Interpolate variables when there are no good data for a depth/pressure bin. |
missing_latitude |
Latitude in decimal degrees to use for depth estimation if ctd object does not contain latitude. |
ctd object with variables binned and 'flag' column removed.
Sean Rohan
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.