Creates an html file with table and sound preview and player
Usage
create_viewer(
audio_dir,
picture_dir = NULL,
table,
captions = NULL,
sorting_columns = NULL,
about = "Created with the `phonfieldworks` package (Moroz 2020).",
map = FALSE,
output_dir,
output_file = "stimuli_viewer",
render = TRUE
)
Arguments
- audio_dir
path to the directory with sounds
- picture_dir
path to the directory with pictures
- table
data frame with data ordered according to files in the audio folder
vector of strings that will be used for captions for a picture.
- sorting_columns
vector of strings for sorting the result column
- about
it is either .Rmd file or string with the text for about information: author, project, place of gahtered information and other metadata, version of the viewer and so on
- map
the logical argument, if
TRUE
and there is aglottocode
column intable
- output_dir
the output directory for the rendered file
- output_file
the name of the result .html file (by default stimuli_viewer)
- render
the logical argument, if
TRUE
renders the created R Markdown viewer to theoutput_dir
folder, otherwise returns the path to the temporary file with a .csv file.