ActivityReads a CSV/TSV, automatically strips any leading header lines, selects user
specified Date and Time columns, and harmonizes one chosen activity
column to the canonical name Activity. Adds an id (defaults to the file
stem if not supplied).
import_acti_file(
file,
date_col,
time_col,
activity_cols,
id = NULL,
keep_extra = FALSE,
drop_original_activity_cols = TRUE
)A data.frame with at least columns id, Date, Time, Activity.
Character path to the actigraphy file.
Character names of the date and time columns in file.
Character vector of candidate activity columns; the first
that exists will be used and renamed to Activity.
Optional subject id (character). Defaults to the filename stem.
Logical; if FALSE keeps only id, Date, Time, Activity,
otherwise preserves extra columns present in the file.
Logical; if TRUE, drop the original activity
Internally uses data.table::fread() with automatic header detection
(skips lines before the first row that looks like a header). No time zone
conversion is performed.
screen_wear()