From 2e7b5bf3d9c5482465d87015ff06f16c7527257c Mon Sep 17 00:00:00 2001 From: francojc Date: Thu, 5 Dec 2024 13:08:15 -0500 Subject: [PATCH] updates examples in curate functions to be working examples --- R/curate_enntt_data.R | 4 +--- R/curate_swda_data.R | 4 +--- man/curate_enntt_data.Rd | 7 +++---- man/curate_swda_data.Rd | 8 +++----- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/R/curate_enntt_data.R b/R/curate_enntt_data.R index 601a22a..a0b55c2 100644 --- a/R/curate_enntt_data.R +++ b/R/curate_enntt_data.R @@ -32,13 +32,11 @@ #' } #' #' @examples -#' \dontrun{ #' # Example using simulated data bundled with the package -#' example_data <- system.file("extdata", "simul_enntt", package = "mypkgname") +#' example_data <- system.file("extdata", "simul_enntt", package = "qtkit") #' curated_data <- curate_enntt_data(example_data) #' #' str(curated_data) -#' } #' #' @importFrom xml2 xml_attr xml_find_all read_html #' diff --git a/R/curate_swda_data.R b/R/curate_swda_data.R index 58eeb7f..db0d308 100644 --- a/R/curate_swda_data.R +++ b/R/curate_swda_data.R @@ -24,13 +24,11 @@ #' } #' #' @examples -#' \dontrun{ #' # Example using simulated data bundled with the package -#' example_data <- system.file("extdata", "simul_swda", "sw00utt", package = "mypkgname") +#' example_data <- system.file("extdata", "simul_swda", package = "qtkit") #' swda_data <- curate_swda_data(example_data) #' #' str(swda_data) -#' } #' #' @export curate_swda_data <- function(dir_path) { diff --git a/man/curate_enntt_data.Rd b/man/curate_enntt_data.Rd index a319a01..c6e4af1 100644 --- a/man/curate_enntt_data.Rd +++ b/man/curate_enntt_data.Rd @@ -43,11 +43,10 @@ The .tok files should contain the corresponding text content, one entry per line. } \examples{ -\dontrun{ -curated_data <- curate_enntt_data("/path/to/enntt/data/") +# Example using simulated data bundled with the package +example_data <- system.file("extdata", "simul_enntt", package = "qtkit") +curated_data <- curate_enntt_data(example_data) -# Check the structure of the returned data str(curated_data) -} } diff --git a/man/curate_swda_data.Rd b/man/curate_swda_data.Rd index 642580b..24def39 100644 --- a/man/curate_swda_data.Rd +++ b/man/curate_swda_data.Rd @@ -33,12 +33,10 @@ with .utt files, as found in the raw SWDA data '\url{https://catalog.ldc.upenn.edu/docs/LDC97S62}. } \examples{ -\dontrun{ -# Process all .utt files in a directory -swda_data <- curate_swda_data("/path/to/swda/files") +# Example using simulated data bundled with the package +example_data <- system.file("extdata", "simul_swda", package = "qtkit") +swda_data <- curate_swda_data(example_data) -# Check the structure of the returned data str(swda_data) -} }