Weird Al Yankovise() a 2 Chainz Lyric
This article is originally published at https://mikejacktzen.wordpress.com
I have a character string snipped from a lyric by Daniel Son the Necklace Don.
Let’s get all Weird Al Yankovic with it.
I’ll revise some words with the datzen::yankovise()
function. You can swap out words using a dictionary of name-value pairs.
paste0(snip <<- "Suede sun roof, hanging out the big top We leave the dealership, head to the rim shop", " - @2chainz aka the Hair Weave Killer") #> [1] "Suede sun roof, hanging out the big top We leave the dealership, head to the rim shop - @2chainz aka the Hair Weave Killer"
Above, we have a bar from 2 Chainz aka the Hair Weave Killer.
Below, we have the yankovised bar from @2Chainz_PhD aka the CPU Core Killer aka ProbaBittyBoi aka Daniel Son the Data Don aka El Efron Jr.
# user supplied dictionary dict_outin = c( datzen::dictate_outin('dealership','SERVER ROOM'), datzen::dictate_outin('big','LAP'), datzen::dictate_outin('rim','RAM') ) yankovise(snip,suffix="- @2Chainz_PhD",dict_outin = dict_outin) #> [1] "suede sun roof hanging out da LAP top we leave da SERVER ROOM head 2 da RAM shop - @2Chainz_PhD"
You might ask, isn’t this just a wrapper to gsub()
or stringr::str_replace_all()
with some added flavor? I might say, yes, yes it is… only with a narrower scope and whose output is streamlined as tweet-ready text.
Thanks for visiting r-craft.org
This article is originally published at https://mikejacktzen.wordpress.com
Please visit source website for post related comments.