From 0e8dd9f63107e6f044a273eec39dd810fc770408 Mon Sep 17 00:00:00 2001 From: Lana Date: Mon, 13 May 2024 11:02:01 -0700 Subject: [PATCH 1/2] fixed give_candygrams function --- R/give_candygrams.R | 2 +- README.md | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/R/give_candygrams.R b/R/give_candygrams.R index 8d71397..67cadcb 100644 --- a/R/give_candygrams.R +++ b/R/give_candygrams.R @@ -30,7 +30,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}") diff --git a/README.md b/README.md index 876c029..f06cad8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ # meangirls - The goal of meangirls is to create quotes in the style of the 2004 @@ -92,7 +91,7 @@ You can also give extra commentary to your announcement: ``` r give_candygrams("Taylor Zimmerman", 2, extra_message = "Merry Christmas!") -#> Two for Taylor Zimmerman. +#> Two for Taylor Zimmerman. Merry Christmas! ``` Some special cases trigger automatic extra commentary or special @@ -100,10 +99,10 @@ behavior: ``` r give_candygrams("Glen Coco", 4) -#> Four for Glen Coco. +#> Four for Glen Coco. You go, Glen Coco! ``` ``` r give_candygrams("Gretchen Weiners", 4) -#> [1] "None for Grethen Weiners." +#> None for Gretchen Weiners. ``` From b700b8f9b83223c65ae056eac03fb0d44f62cec4 Mon Sep 17 00:00:00 2001 From: Lana Date: Mon, 13 May 2024 11:21:46 -0700 Subject: [PATCH 2/2] fixed functions for tests --- R/compliments.R | 6 +++--- R/give_candygrams.R | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/compliments.R b/R/compliments.R index e0066f2..e81f48e 100644 --- a/R/compliments.R +++ b/R/compliments.R @@ -2,14 +2,14 @@ #' #' @param name The person's name #' @param follow_up Should the function follow up with questions? -#' Defaults to `TRUE`. +#' Defaults to `FALSE`. #' #' @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 67cadcb..4a983ec 100644 --- a/R/give_candygrams.R +++ b/R/give_candygrams.R @@ -30,7 +30,7 @@ give_candygrams <- function(person, number, number <- str_to_title(as.english(number)) - glue::glue("{number} for {person}. {extra_message}") + glue::glue("{number} for {person}.{extra_message}")