wwwPrep: Create the 'www' Directory for a Shiny App

View source: R/wwwPrep.R

wwwPrepR Documentation

Create the 'www' Directory for a Shiny App

Description

Many shiny apps for speech experiments require resources (like WAV files) in the www subdirectory. This command takes care of gathering datafiles and putting them in the appropriate directory for

Usage

wwwPrep(
  from = NULL,
  is_dir = FALSE,
  path = ".",
  recordJS = FALSE,
  volumeCalibration = FALSE,
  HugginsPitchScreen = FALSE,
  AntiphaseScreen = FALSE
)

Arguments

from

A character vector of filenames or a single directory name. Leave NULL (default) if you only want to add one of the datasets included in the package.

is_dir

Boolean. Is 'from' a directory?

path

A character vector naming the path to the parent directory of 'www'. Defaults to working directory.

recordJS

Boolean. Should the JavaScript files for audio recording be copied to 'www'? (Not necessary if using any of the speechcollectr audio recording functions)

volumeCalibration

Boolean. Should cal_noise() for testing headphone volume be copied to 'www'?

HugginsPitchScreen

Boolean. Should HugginsPitchData() for Huggins Pitch Headphone Screen be copied to 'www'?

AntiphaseScreen

Boolean. Should AntiphaseData() for Antiphase Headphone Screen be copied to 'www'?

Value

A www subdirectory in the current working directory. Success messages will be printed in the console as each step towards creating the directory is completed.

Examples

# If you wanted to use the Huggins Pitch Headphone Screen,
# You could get the audio in the right place with the following command:
wwwPrep(HugginsPitchScreen = TRUE)
# But to run this only once, and not put it in your app.R file

abbey-thomas/speechcollectr documentation built on Nov. 19, 2024, 7:09 p.m.