View source: R/write_parquet.R
| build_epoch_table | R Documentation |
Reads epoch-level files from meta/ms5.outraw and constructs a single
flat data frame with one row per epoch.
build_epoch_table(
metadatadir = c(),
params_general = c(),
params_phyact = c(),
results_dir = NULL,
verbose = TRUE
)
metadatadir |
Directory that holds a folder 'meta' and inside this a folder 'ms5.outraw' which contains the milestone data produced by g.part5. The folder structure is normally created by g.part5 and GGIR will recognise what the value of metadatadir is. |
params_general |
See details in GGIR. |
params_phyact |
See details in GGIR. |
results_dir |
Optional character scalar. Path to |
verbose |
See details in GGIR. |
The function:
Selects an ms5 configuration folder (prefer requested threshold combination if available).
Reads time-series files (CSV preferred over RData).
Infers missing filename and maps filename -> ID
from results/part2_summary.csv when needed.
Derives calendar_date and weekday from epoch
timenum using timezone information.
Harmonizes column sets across recordings by filling missing columns
with NA.
Either NULL (if no usable epoch data were found), or a list with:
epoch_df: data frame with one row per epoch.
config_name: selected ms5 configuration folder name.
Samuel Timileyin Afolabi <samuelafolabimails@gmail.com>
write_epoch_parquet,
write_dashboard_parquet
## Not run:
res <- build_epoch_table(
metadatadir = "path/to/output_run/output_test_run",
params_general = list(desiredtz = ""),
params_phyact = list(part6_threshold_combi = "40_100_400"),
verbose = TRUE
)
if (!is.null(res)) {
names(res)
nrow(res$epoch_df)
res$config_name
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.