read.DeponsTrackBatch: Read and Process DEPONS Batchmap and Statistics Files

View source: R/calibrate_methods.R

read.DeponsTrackBatchR Documentation

Read and Process DEPONS Batchmap and Statistics Files

Description

Reads batch map files and random porpoise files from a specified directory, merges them for each run, and returns a list of 'DeponsTrack' objects and parameter values

Usage

read.DeponsTrackBatch(
  dir,
  par,
  title = "NA",
  landscape = "NA",
  simtime = "NA",
  crs = as.character(NA),
  tz = "UTC"
)

Arguments

dir

Character string specifying the directory path containing the 'Batchmap' and 'RandomPorpoise' files

par

Character vector specifying the column names to extract from the batch map file for each run. These parameters are then stored in the 'Parameters' list

title

Optional character string giving name of simulation

landscape

Character string. Name of the simulation landscape

simtime

Character sting with date of simulation (format yyyy-mm-dd). If not provided this is obtained from name of input file

crs

Character, coordinate reference system (map projection)

tz

Time zone used in simulations. Defaults to UTC/GMT

Value

A list of 'DeponsTrack' objects and parameter values associated with run id

Examples

## Not run: 
# Specify the directory containing Batchmap and Statistics files
dir_path <- "path/to/batchdata"

# Specify parameters to extract from Batchmap files
par <- c("parameter1", "parameter2")

# Run the function
results <- read.DeponsBatch(
  dir = dir_path,
  par = par,
  crs = "+proj=longlat +datum=WGS84"
)

## End(Not run)

jacobnabe/DEPONS2R documentation built on Jan. 26, 2025, 9:33 a.m.