Parses a Condor ActTrust .txt export into a tidy tibble (or data frame,
if the tibble package isn't installed). The file format consists of a
variable-length key-value header block followed by semicolon-delimited
epoch rows. The header ends at the line beginning with DATE/TIME.
Arguments
- path
character(1)orfs::path. Path to the ActTrust.txtfile.- tz
character(1). Time zone string passed tolubridate::parse_date_time(). Defaults to"UTC". Set to the local recording time zone for correct circadian alignment.- encoding
character(1). File encoding. Defaults to"latin1", which matches Condor's default export encoding.
Value
A tibble (or plain data frame, if the tibble package isn't
installed) with one row per epoch and the following columns:
datetimePOSIXct— epoch timestamp.activitydouble— PIM activity count.int_tempdouble— internal (on-body) temperature, degC.ext_tempdouble— external (ambient) temperature, degC.NAif unavailable.ZCMndouble— normalised zero-crossing mode count.NAif unavailable.lightdouble— total light intensity (lux).NAif unavailable.
A metadata attribute is attached (a named list with subject,
device_id, device_model, firmware_version, interval_s,
source_file) – the same attribute pattern used by
axivity_read_cwa().
Details
This is a device-format parser only – it returns the file's own epoch
columns and does not add any pipeline-specific columns or classes.
Downstream packages (e.g. zeitR) are expected to wrap this in their own
function to reshape the output into their pipeline's shape, the same way
zeitR::read_axivity() currently wraps axivity_read_cwa().
See also
axivity_read_cwa() for the Axivity .cwa equivalent.
Examples
if (FALSE) { # \dontrun{
rec <- read_acttrust("recordings/P001.txt")
rec
attr(rec, "metadata")
} # }