damr (version 0.3.4)

read_dam_file: Reads data from a single DAM2 single beam or a DAM5 multibeam file

Description

This function retrieves activity data in a DAMS text file. It allows selection of a date range and channels (i.e. regions).

Usage

read_dam_file(path, region_id = 1:32, start_datetime = -Inf,
  stop_datetime = +Inf, tz = "UTC")

Arguments

path

location of the file to read (character)

region_id

vector of unique regions to read

start_datetime, stop_datetime

the start and the end of an the experiment (see details)

tz

the timezone (see OlsonNames for a list)

Value

A behavr table. The metadata contains an autogenerated id per animal. The data has the columns:

  • id -- autogenerated unique identifier, one per animal

  • t -- time

  • activity -- number of beam crosses

Details

start_datetime and stop_datetime are formatted as "YYYY-MM-DD HH:MM:SS". start_datetime is used as the reference time (ZT0). Therefore, if you are interested in circadian analysis and D -> L transitions are at 10:00:00, you probably want to set start_datetime = "YYYY-MM-DD 10:00:00".

See Also

  • load_dam -- to load data from many files and biological conditions using metadata (the recommended alternative)

Examples

Run this code
# NOT RUN {
path <- damr_example("M064.txt")
dt <- read_dam_file(path, region_id = c(1:3), start_datetime = "2017-06-30 15:00:00")
print(dt)
# }

Run the code above in your browser using DataLab