fast_recovery: Fast recovery of record using argument file

View source: R/fast_recovery.R

fast_recoveryR Documentation

Fast recovery of record using argument file

Description

Recover a single record fast by using an argument csv file that passes arguments to different functions for recovery.

Usage

fast_recovery(
  filepath_trace = "WS_25_1981_trace.csv",
  col_x_trace = 1,
  col_y_trace = 2,
  filepath_timedots = "WS_25_1981_time_dots.csv",
  col_x_timedots = 1,
  col_y_timedots = 2,
  filepath_args = "WS_25_1981_args.csv"
)

Arguments

filepath_trace

file path of raw trace csv file

col_x_trace

position of trace x values column

col_y_trace

posiiton of trace y values column

filepath_timedots

file path of raw time dots csv file

col_x_timedots

posiiton of timedots x values column

col_y_timedots

position of timedots y values column

filepath_args

file path of csv file containing:

  • radius : the length of the radius arm in cm. This is constant across all records, but some of the earlier records that I have were magnified by a slightly larger amount, and therefore the scale is slightly different.

  • center_y: height of the pivot point of the transducer arm from depth = 0 in cm. In other words, the y-value of the center of the circle that draws the dive record. This value may change across records, but helper functions are available to provide estimates (?find_center_y).

  • center_along_y: distance in cm used for centering the record. All time dots will be centered along y = -center_along_y

  • time_period_min: time elapsed between two time dots.

  • spar_h : spar value used for high depths of the records to increase resolution for the smooth_trace_dive() function.

  • depth_thresh: depth threshold to use for the rolling mean function to determine what depths should be considered diving behavior.

  • date_start: start of the record in y:m:d h:m:s format.

  • max_depth: maximum depth to use for depth transformation. Only for records without a psi calibration curve.

  • k_h : larger window to use for zoc() function, if needed.

  • depth_bounds_l, depth_bounds_h: low and high depth bounds that encapsulate where depth = 0 is likely to be. Used for zoc() function.

  • on_seal : time the tdr was placed on seal. In y:m:d h:m:s format.

  • off_seal: time the tdr was taken off seal. In y:m:d h:m:s format.

Value

trace data frame after full recovery

Examples

## Not run: 
filepath <- system.file("extdata", "WS_25_1981", package = "recoverKBTDR")
filepath_trace <- paste(filepath, "WS_25_1981_trace.csv", sep = "/")
filepath_timedots <- paste(filepath, "WS_25_1981_time_dots.csv", sep = "/")
filepath_args <- paste(filepath, "WS_25_1981_args.csv", sep = "/")

fast_recovery(filepath_trace, col_x_trace = 1, col_y_trace = 2,
# filepath_timedots, col_x_timedots = 1, col_y_timedots =2, filepath_args)

## End(Not run)


EmmaLiTsai/recoverKBTDR documentation built on Aug. 29, 2024, 10:38 a.m.