Inspects the file extension and header, then dispatches to the correct parser.
Arguments
- path
Character. Path to any supported pressure data file.
- layout
A pr_layout object. If
NULL, inferred by the dispatched parser.- verbose
Logical. Default
TRUE.
Value
A pr_trial object (for .asc / .txt / .csv), or a
logical mask matrix / pr_mask object (for .msa/.msr/.msp).
Examples
path <- pr_example_files("insole")
tr <- pr_read_auto(path, verbose = FALSE)
inherits(tr, "pr_trial")
#> [1] TRUE