read_HRV_reports | R Documentation |
Read and transform LabChart's HRV report file (.txt
) to a tidy tibble
with one row per file.
read_HRV_reports(file, format_cols = TRUE, encoding = "UTF-16LE", ...)
file |
(Character) Path to LabChart's HRV report ( |
format_cols |
(Logical) If |
encoding |
(Character) Text encoding of the HRV report files. Default value is set to "UTF-16LE" as it works well with my testing data. If the result seems abnormal, try different text encoding (visit readtext manual to see all available options) |
... |
extra arguments passed to |
read_HRV_reports()
reads contents of LabChart's HRV report from text file (.txt
)
into character vector using readtext::readtext()
function with default text encoding as "UTF-16LE".
Then, each key-value fields of the character vector will be extracted and transform into a tibble
by regular expression pattern matching as in parse_HRV_reports()
.
The result will be a tibble with column names corresponding to "key" in the input file(s), and values in each rows mapped to "value" from the input file(s).
A tibble of HRV report (one row per subject)
# Path to `HRV/` folder containing example HRV report files (`.txt`) path <- labChartHRV_example("HRV") # Read into tibble read_HRV_reports(path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.