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}.")) }