diff --git a/R/df_to_eaf.R b/R/df_to_eaf.R index 0eec735..f67cb6b 100644 --- a/R/df_to_eaf.R +++ b/R/df_to_eaf.R @@ -20,6 +20,10 @@ #' output_file = 'test.eaf', #' ref_file = 'test.wav') #' +#' # Remove file in order to pass checks +#' +#' file.remove("test.eaf") +#' #' @importFrom mime guess_type #' @importFrom stats na.omit #' @export diff --git a/R/df_to_exb.r b/R/df_to_exb.r index 99af38d..0574114 100644 --- a/R/df_to_exb.r +++ b/R/df_to_exb.r @@ -42,6 +42,10 @@ #' ud_meta = meta, #' speaker_table = speaker_data) #' +#' # Remove file in order to pass checks +#' +#' file.remove("beck.xml") +#' #' @export df_to_exb <- function(df, diff --git a/R/draw_sound.R b/R/draw_sound.R index 1448c81..9d66075 100644 --- a/R/draw_sound.R +++ b/R/draw_sound.R @@ -69,7 +69,7 @@ #' @return Oscilogram and spectrogram plot (and possibly TextGrid annotation). #' #' @examples -#' \dontrun{ +#' \donttest{ #' draw_sound(system.file("extdata", "test.wav", package = "phonfieldwork")) #' #' draw_sound( diff --git a/R/draw_spectrogram.R b/R/draw_spectrogram.R index 196c5d8..a36d17a 100644 --- a/R/draw_spectrogram.R +++ b/R/draw_spectrogram.R @@ -47,8 +47,10 @@ #' columns. Optional columns are \code{colors} and \code{content}. #' @param formant_df dataframe with formants from \code{formant_to_df()} function #' +#' @return Plot the comptued spectrogram +#' #' @examples -#' \dontrun{ +#' \donttest{ #' draw_spectrogram(system.file("extdata", "test.wav", #' package = "phonfieldwork" #' )) diff --git a/R/get_sound_duration.R b/R/get_sound_duration.R index 031fe05..6499a4b 100644 --- a/R/get_sound_duration.R +++ b/R/get_sound_duration.R @@ -6,6 +6,8 @@ #' #' @param file_name a sound file #' +#' @return Dataframe with two columns: file name and duration +#' #' @examples #' get_sound_duration( #' system.file("extdata", "test.wav", package = "phonfieldwork") diff --git a/R/read_from_folder.R b/R/read_from_folder.R index 369a670..22f37d4 100644 --- a/R/read_from_folder.R +++ b/R/read_from_folder.R @@ -7,6 +7,8 @@ #' @param path to a folder with multiple sound files. #' @param type should be one of the following: "duration", "audacity", "eaf", "exb", "flextext", "formant", "intensity", "picth", "srt", "textgrid" #' +#' @return dataframe with contents of all files of a selected type +#' #' @examples #' #' read_from_folder(system.file("extdata", package = "phonfieldwork"), "eaf") diff --git a/man/df_to_eaf.Rd b/man/df_to_eaf.Rd index 4e3389c..f5897ab 100644 --- a/man/df_to_eaf.Rd +++ b/man/df_to_eaf.Rd @@ -33,6 +33,10 @@ df_to_eaf(df = df, output_file = 'test.eaf', ref_file = 'test.wav') +# Remove file in order to pass checks + +file.remove("test.eaf") + } \author{ Sergej Kudrjashov diff --git a/man/df_to_exb.Rd b/man/df_to_exb.Rd index 3f9d510..9d4110e 100644 --- a/man/df_to_exb.Rd +++ b/man/df_to_exb.Rd @@ -65,6 +65,10 @@ df_to_exb(df = df, ud_meta = meta, speaker_table = speaker_data) +# Remove file in order to pass checks + +file.remove("beck.xml") + } \author{ Valeria Buntiakova diff --git a/man/draw_sound.Rd b/man/draw_sound.Rd index 5c63734..e7e2d73 100644 --- a/man/draw_sound.Rd +++ b/man/draw_sound.Rd @@ -138,7 +138,7 @@ Oscilogram and spectrogram plot (and possibly TextGrid annotation). Create oscilogram and spectrogram plot. } \examples{ -\dontrun{ +\donttest{ draw_sound(system.file("extdata", "test.wav", package = "phonfieldwork")) draw_sound( diff --git a/man/draw_spectrogram.Rd b/man/draw_spectrogram.Rd index b5b2ae3..b112918 100644 --- a/man/draw_spectrogram.Rd +++ b/man/draw_spectrogram.Rd @@ -85,12 +85,15 @@ columns. Optional columns are \code{colors} and \code{content}.} \item{formant_df}{dataframe with formants from \code{formant_to_df()} function} } +\value{ +Plot the comptued spectrogram +} \description{ This function was slightly changed from \code{phonTools::spectrogram()}. Argument description is copied from \code{phonTools::spectrogram()}. } \examples{ -\dontrun{ +\donttest{ draw_spectrogram(system.file("extdata", "test.wav", package = "phonfieldwork" )) diff --git a/man/get_sound_duration.Rd b/man/get_sound_duration.Rd index 9f79d37..9b5cfa9 100644 --- a/man/get_sound_duration.Rd +++ b/man/get_sound_duration.Rd @@ -9,6 +9,9 @@ get_sound_duration(file_name) \arguments{ \item{file_name}{a sound file} } +\value{ +Dataframe with two columns: file name and duration +} \description{ Calculate sound(s) duration. } diff --git a/man/read_from_folder.Rd b/man/read_from_folder.Rd index 32581c1..6ef5a38 100644 --- a/man/read_from_folder.Rd +++ b/man/read_from_folder.Rd @@ -11,6 +11,9 @@ read_from_folder(path, type = "textgrid") \item{type}{should be one of the following: "duration", "audacity", "eaf", "exb", "flextext", "formant", "intensity", "picth", "srt", "textgrid"} } +\value{ +dataframe with contents of all files of a selected type +} \description{ This function reads multiple files from the folder. The first argument is the path, the second argument is the type of files to read. }