str_msg: Message friendly string interpolation.

Description Usage Arguments Value See Also Examples

View source: R/str_msg.R

Description

This is a wrapper function around stringr::str_interp() and stringr::str_c(). It aids in creating useful messages which can be passed to base::warning() or base::stop(), for example, or other logging functions.

Usage

1

Arguments

...

one or more character vectors which are passed to stringr::str_c(). Multiple strings are automatically joined with a space as seperator.

env

the environment in which to evaluate the expressions.

Value

an interpolated character string.

See Also

stringr::str_interp() and stringr::str_c() which this function wraps for further documenation or examples on string interpolation or the joining of strings.

Examples

1
2
user_name <- "World"
str_msg("Hello ${user_name}!", "Welcome to tidyverse.")

tstev/tstevR documentation built on May 18, 2020, 10:57 p.m.