Skip to content

Conversation

@amhrasmussen
Copy link
Contributor

Using str_interp() it seems that interpolated list are outputted differently depending on the presence of additional interpolated expressions.

This pull request makes behavior independent of additional interpolations.

Before:

a_list <- c("item1", "item2", "item3")
other <- "fruit"
stringr::str_interp("here is a list of 3 items: ${a_list}")
[1] "here is a list of 3 items: item1"
stringr::str_interp("here is the list again: ${a_list}, and another ${other}")
[1] "here is the list again: c("item1", "item2", "item3"), and another fruit"

After:

stringr::str_interp("here is a list of 3 items: ${a_list}")
[1] "here is a list of 3 items: c("item1", "item2", "item3")"
stringr::str_interp("here is the list again: ${a_list}, and another ${other}")
[1] "here is the list again: c("item1", "item2", "item3"), and another fruit"

Anton Rasmussen added 3 commits January 31, 2018 19:25
… list depending on presence of of additional placholder
…LIFY=FALSE in mapply. This should make str_interp behave more consistently when interpolating lists into placeholders.
@smbache
Copy link
Member

smbache commented Feb 5, 2018

Looks good to me. Thanks!

@hadley
Copy link
Member

hadley commented May 8, 2018

Can you please add a bullet to NEWS? It should briefly describe the change (starting with name of the function), and crediting yourself with (@yourname, #issuenumber).

@amhrasmussen
Copy link
Contributor Author

@hadley I've added a bullet to NEWS.md. No issue has been created for this, so I've left that out.

@hadley hadley merged commit 0b5a4c4 into tidyverse:master Aug 28, 2018
@hadley
Copy link
Member

hadley commented Aug 28, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants