It reads a file or a list of files with data exported from AAA. The data are automatically transformed from a wide to a long format (each row has values of X or Y axes for each fan line). The imported tibble can then be used for plotting and statistical analysis.
Usage
read_aaa(
file,
coordinates = "cartesian",
format = "long",
na_rm = FALSE,
knots = NULL,
column_names = NULL
)
Arguments
- file
The path of the file with AAA data. It can also be a character vector with multiple paths as separate strings..
- coordinates
A string specifying the coordinate system. Possible values are
"cartesian"
(the default) and"polar"
.- format
A string specifying the data format. Possible values are
"long"
and"wide"
(the default is"long"
).- na_rm
Remove NAs (the default is
FALSE
).- knots
The number of spline knots or fan lines.
- column_names
The names of the columns without including the splines columns.
Examples
columns <- c("speaker","seconds","rec_date","prompt","label",
"TT_displacement","TT_velocity","TT_abs_velocity","TD_displacement",
"TD_velocity","TD_abs_velocity")
file_path <- system.file("extdata", "it01.tsv", package = "rticulate")
tongue <- read_aaa(file_path, knots = 42, column_names = columns)
#> Rows: 11 Columns: 95
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (4): speaker, rec_date, prompt, label
#> dbl (91): seconds, TT_displacement, TT_velocity, TT_abs_velocity, TD_displac...
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> ! Column `Date Time of recording` not found. Did not create a `displ_id` column.
#> We recommend to include `Date Time of recording` when exporting data from AAA.