import_logs: Parse Recorder Activity From Log Files

View source: R/new_logfileparser.R

import_logsR Documentation

Parse Recorder Activity From Log Files

Description

Reads log files created by acoustic monitors and determines their status throughout a specified monitoring period. This information is essential for interpreting patterns of bat activity because it effectively amounts to the sampling effort. In other words, did you record no bats that night because there were no bats, or because the monitor had run out of batteries...

Usage

import_logs(
  log_path,
  data_path = NULL,
  monitoring_start = NULL,
  monitoring_end = NULL
)

Arguments

log_path

Character. Path to directory containing log files generated by a Wildlife Acoustics SM3 or SM4 or Titley Anabat Swift bat recorder, organised as outlined above.

data_path

Character. Path to an RData file to add activity data to. Optional, a save location will be created before data are saved.

monitoring_start

Character. A date in the format "YYYY-MM-DD". Optional: use to specify a monitoring start date prior to the earliest date for which a log file exists.

monitoring_end

Character. A date in the format "YYYY-MM-DD". Optional: use to specify a monitoring end date prior to the earliest date for which a log file exists.

Value

An RData file containing a data.frame of recorder activity.

Note

this function is currently only capable of parsing log files generated by either Wildlife Acoustics SM3 or SM4 or Titley Anabat Swift bat recorders.

To work as expected, log files must be renamed following the conventions outlined below!

Wildlife Acoustics: These files should be renamed so that each file name begins with the site name followed by a hyphen and any additional information (e.g. date) that is desired in the file name. For example: "site_1-2019.txt". The hyphen and all characters that follow it will be disregarded. The site name should match the site name assigned in GUANO metadata so that the log file data is appropriately matched with the acoustic data.

Anabat Swift: These files do not need to be renamed, but files for each site should be placed in their own sub-folder. The folder name should match the site name assigned in the GUANO metadata of the corresponding WAV files so they can be matched.

See Also

Other import tools: import_GUANO()

Examples

## Not run: #' import_logs("C:/Folder/Folder/logss_Folder", "C:/Folder/Folder/Data.RData", "2021-01-01", "2021-12-31)


vulpes-vulpes/batr documentation built on Jan. 23, 2025, 3:23 p.m.