This function checks each ITS file in a folder to determine if each/any ITS file contains recordings which start on more than one day, based on the specified local `time.zone`. This happens when a family/user starts recording one one day, turns the recorder off, then turns the recorder on again on a later day.

For any ITS file containing more than one recording day, this function will output a CSV containing Recording-level information for the user to review. If any files contain more than one recording day, use the function `remove_recordings` to separate the recordings into multiple ITS files before passing the ITS files to the function `ITS_to_seconds`.

If desired, this function will also output the ITS Recording-level information for every input ITS file.

For more information, including example outputs and explanations of all output columns, see https://htanderson.github.io/ITSbin/

check_multiday(
  ITS.dir,
  CSV.dir,
  time.zone = NULL,
  write.all.recordings = FALSE
)

Arguments

ITS.dir

Directory (string) containing ITS files. Default = working directory.

CSV.dir

Directory (string) to store CSV output files.

time.zone

OS-specific character string for time zone. To use current system timezone, type `Sys.timezone()`. For other options, run `OlsonNames()` for list.

write.all.recordings

Logical. Default = `FALSE`. Output a CSV containing ITS Recording-level information for each input ITS file. Note: The recordings CSV will *always* be written for any ITS files containing recordings which start on more than one day.

Value

An its/xml file

Examples

if (FALSE) { check_multiday( ITS.dir = "SERVER:/ITS_Files/", CSV.dir = "SERVER:/CSVOutput/", time.zone = "America/Los_Angeles") }