diff --git a/R/compliments.R b/R/compliments.R index e0066f2..bffdae0 100644 --- a/R/compliments.R +++ b/R/compliments.R @@ -7,9 +7,9 @@ #' @return A compliment string #' #' @export -really_pretty <- function(name, follow_up = TRUE) { +really_pretty <- function(name, follow_up = FALSE) { - compliment <- glue::glue("You're, like, really pretty, {name}.") + compliment <- glue::glue("You're, like, really pretty {name}.") if (follow_up) { compliment <- paste(compliment, diff --git a/R/give_candygrams.R b/R/give_candygrams.R index 8d71397..c1a5ace 100644 --- a/R/give_candygrams.R +++ b/R/give_candygrams.R @@ -12,10 +12,12 @@ #' @export give_candygrams <- function(person, number, extra_message = NULL) { + library(stringr) + library(english) stopifnot(number > 0) - if (str_detect(person, "Gretchen")) { + if (stringr::str_detect(person, "Gretchen")) { return(cat("None for Gretchen Weiners.")) @@ -30,8 +32,7 @@ give_candygrams <- function(person, number, number <- str_to_title(as.english(number)) - glue::glue("{number} for {person}.") - + glue::glue("{number} for {person}.{extra_message}") } @@ -61,3 +62,4 @@ add_commentary <- function(person, number) { return("") } +