bind_counter_data: A function that combines and processes raw Logie counter data...

View source: R/bind_counter_data.R

bind_counter_dataR Documentation

A function that combines and processes raw Logie counter data files.

Description

A function to combine and process raw Logie counter data. Raw Logie counter files are combined and errors and duplicates are removed.

Usage

bind_counter_data(
  path_to_folder,
  no_channels,
  site,
  year,
  max_pss,
  print_removed = FALSE
)

Arguments

path_to_folder

The file path to the folder that contains raw Logie counter data files (.txt) to be processed.

no_channels

The number of counter channels that were operated. Data with channel numbers greater than no_channels are assumed to be false data and are removed from the final data frame.

site

Name of the study river. The site name appears as a column in the resulting data frames and in the file name of output .csv files (i.e., siteyear.csv).

year

Year of counter operation. The year is used to name output .csv files (i.e., siteyear.csv).

max_pss

The maximum peak signal size (pss).

print_removed

Defaults to FALSE. If TRUE, error data that were removed from the final data frame are printed to the path_to_folder as .csv files.

Value

A list containing four elements: counter_data (cleaned master data file), wrong_pss (data containing errors in pss that were removed from counter_data), wrong_channel (data containing errors in channel that were removed from counter_data), and wrong_description (data containing errors in description that were removed from counter data). Counter_data is written to the path_to_folder location as a .csv file. If print_removed is TRUE, wrong_pss, wrong_channel, and wrong_description .csv files are also created.


InStreamFisheries/FishCounter2 documentation built on Dec. 15, 2024, 9:23 p.m.