Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions R/make_phrase.R
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}."))
}