From c1489ff2c0354d683330c777c1c85d0f65298420 Mon Sep 17 00:00:00 2001 From: jacqueline-98 Date: Thu, 7 Dec 2023 11:01:03 +0100 Subject: [PATCH] example changed --- R/extractFilenames.R | 2 +- R/fileHeaderPrompt.R | 4 +++- man/extractFilenames.Rd | 2 +- man/fileHeaderPrompt.Rd | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/extractFilenames.R b/R/extractFilenames.R index ea87534..53d2bf6 100644 --- a/R/extractFilenames.R +++ b/R/extractFilenames.R @@ -7,7 +7,7 @@ #' @param text user prompt #' @returns A list holding file names from the user prompt. #' @examples -#' \donttest{ +#' { #' user_prompt <- "How do I perform PCA on data in my file called test.txt?" #' extractFilenames(text=user_prompt) #' } diff --git a/R/fileHeaderPrompt.R b/R/fileHeaderPrompt.R index f09d659..c78c184 100644 --- a/R/fileHeaderPrompt.R +++ b/R/fileHeaderPrompt.R @@ -6,7 +6,9 @@ #' @param filenames list containing filenames. #' #' @examples -#' \dontrun{ +#' \donttest{ +#' prompt <- "how do I perform PCA on data in a file called test.txt?" +#' filenames <- extractFilenames(prompt) #' fileHeaderPrompt(filenames) #' } #' @export diff --git a/man/extractFilenames.Rd b/man/extractFilenames.Rd index ea45c87..5ae1e8e 100644 --- a/man/extractFilenames.Rd +++ b/man/extractFilenames.Rd @@ -19,7 +19,7 @@ are supported by this function are *.txt, *.tsv, *.csv *.xls, *.xlsx, If no filenames are found, the function will return NA. } \examples{ -\donttest{ +{ user_prompt <- "How do I perform PCA on data in my file called test.txt?" extractFilenames(text=user_prompt) } diff --git a/man/fileHeaderPrompt.Rd b/man/fileHeaderPrompt.Rd index 21413b2..3861648 100644 --- a/man/fileHeaderPrompt.Rd +++ b/man/fileHeaderPrompt.Rd @@ -15,7 +15,9 @@ files. Recommended is to use this function with the results from \code{\link{extractFilenames}} } \examples{ -\dontrun{ +\donttest{ +prompt <- "how do I perform PCA on data in a file called test.txt?" +filenames <- extractFilenames(prompt) fileHeaderPrompt(filenames) } }