Build a days dataset by summarising palmsplus
by day and person (identifier
). Not all variables in palmsplus
are summarised, only those specified using palms_add_field
with
the argument domain_field = TRUE
. By default, a duration
field
is added (e.g., the total minutes per day).
All data are summarised by default. However, additional aggragation domains
can be specified using palms_add_domain
before building days.
Domains are a subset of data, such as during school time. All domain_field
variables will be summarised for each domain seperatly.
palms_build_days(data)
data | The palmsplus data obtained from |
---|
A table summarised by day.
data("palms") palms_remove_tables() # Add a field, and make it a domain_field palms_add_field("mvpa", "activityintensity > 1", TRUE) palmsplus <- palms_build_palmsplus(palms)#> [1/1] Computed palmsplus for: BC0627palms_add_domain("walking", "tripmot == 3") # This will have 'walking' and 'total' domains # Each domain will have 'duration' and 'mvpa' fields days <- palms_build_days(palmsplus)