View source: R/sample_binfile.R
sample_binfile | R Documentation |
Sample Bin File
sample_binfile(
binfile,
binfile_path,
output_folder,
start_time = NULL,
end_time = NULL,
downsample = TRUE,
output_csv = FALSE
)
binfile |
Text lines read from an open connection to a bin file. |
binfile_path |
Path to the bin file to be processed. |
output_folder |
Path to the folder containing GENEAcore run outputs and Measurement Period Information (MPI) files. |
start_time |
Time stamp to start the read from, default start of file. |
end_time |
Time stamp to end the read from, default end of file. |
downsample |
Logical to determine whether to downsample the file, default TRUE. |
output_csv |
Allow outputs of bin file sampling to be saved as CSV. |
Function to read in a GENEActiv bin file with option to downsample to 1Hz.
List of 1Hz downsampled data or raw sample data.
binfile_path <- system.file("inst/extdata/20Hz_file.bin", package = "GENEAcore")
output_folder <- "."
con <- file(binfile_path, "r")
binfile <- readLines(con, skipNul = TRUE)
close(con)
measurements <- sample_binfile(binfile, binfile_path, output_folder)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.