read_cefas: Read a CEFAS file

Description Usage Arguments Value Examples

View source: R/read_cefas.R

Description

Downloading data from CEFAS tags yields a non-tabular CSV. read_cefas reads a CEFAS file and extracts the depth records in a tidy data.frame.

Usage

1
read_cefas(cefas_file, deployed, recovered)

Arguments

cefas_file

character. Path to CEFAS file.

deployed

POSIXct. Datetime of deployment.

recovered

POSIXct. Datetime of recovery

Value

data.frame with columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load metadata
metadata_path <- system.file('extdata',
                             'MOC2015PFSHmetadata.csv',
                             package = 'pfsh.dive')
metadata <- readr::read_csv(metadata_path)

# Read CEFAS output
tdr_path <- system.file('extdata',
                         paste0(metadata$TDR_filename[1], '.CSV'),
                         package = 'pfsh.dive')
tdr <- read_cefas(tdr_path,
                  metadata$Deployed[1],
                  metadata$Recovered[1])

mczapanskiy-usgs/pfsh.dive documentation built on May 26, 2019, 5:42 p.m.