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.

read_aaa(
  file,
  column_names,
  fan_lines = 42,
  coordinates = "cartesian",
  na_rm = FALSE,
  format = "long"
)

Arguments

file

The path of the file with AAA data. It can also be a character vector with multiple paths as separate strings..

column_names

The names of the columns without including the splines columns.

fan_lines

The number of fan lines (the default is 42).

coordinates

A string specifying the coordinate system. Possible values are "cartesian" (the default) and "polar".

na_rm

Remove NAs (the default is FALSE).

format

A string specifying the data format. Possible values are "long" and "wide" (the default is "long").

Value

A tibble. An .index column is added which indexes (groups) each tongue contour.

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, columns, na_rm = TRUE)
#> 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.