From 938f85e354119bf797f45b3487a931a57ff68d30 Mon Sep 17 00:00:00 2001 From: camwong16 <83614230+camwong16@users.noreply.github.com> Date: Thu, 13 May 2021 20:48:56 -0700 Subject: [PATCH] Update make_phrase.R --- R/make_phrase.R | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/R/make_phrase.R b/R/make_phrase.R index 6dbbafa..3145755 100644 --- a/R/make_phrase.R +++ b/R/make_phrase.R @@ -1,7 +1,6 @@ #' Puts the various parts of speech together into a full phrase. #' #' @param num An integer -#' @param num_word A string corresponding to the integer #' @param item A string #' @param verb A string #' @param adjective A string @@ -13,17 +12,19 @@ #' @import glue #' @import dplyr #' @import purrr +#' @import english #' #' @export -make_phrase <- function(num, num_word, item, verb, adjective, location){ +make_phrase <- function(num, item, verb, adjective, location){ verb <- str_replace_na(verb, "") - - #???? - - + adjective <- str_replace_na(adjective, "") + location <- str_replace_na(location, "") + num <- english::english(num) + + glue_collapse(glue("{num} {adjective} {item} {verb} {location}.")) }