Description Usage Arguments Value Examples
View source: R/replace_internet_slang.R
Replaces Internet slang.
1 2 3 |
x |
The text variable. |
slang |
A vector of slang strings to replace. |
replacement |
A vector of string to replace slang with. |
ignore.case |
logical. If |
... |
Other arguments passed to |
Returns a vector with names replaced.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | x <- c(
"Marc the n00b needs to RTFM otherwise ymmv.",
"TGIF and a big w00t! The weekend is GR8!",
"Will will do it",
'w8...this PITA needs me to say LMGTFY...lmao.',
NA
)
replace_internet_slang(x)
replace_internet_slang(x, ignore.case = FALSE)
replace_internet_slang(x, replacement = '<<SLANG>>')
replace_internet_slang(
x,
replacement = paste0('{{ ', lexicon::hash_internet_slang[[2]], ' }}')
)
|
[1] "Marc the newbie needs to read the fucking manual otherwise your mileage may vary."
[2] "thank god, it's friday and a big hooray! The weekend is great!"
[3] "Will will do it"
[4] "wait...this pain in the ass needs me to say let me google that for you...laughing my ass off."
[5] NA
[1] "Marc the newbie needs to read the fucking manual otherwise ymmv."
[2] "thank god, it's friday and a big hooray! The weekend is great!"
[3] "Will will do it"
[4] "w8...this pain in the ass needs me to say let me google that for you...lmao."
[5] NA
[1] "Marc the <<SLANG>> needs to <<SLANG>> otherwise <<SLANG>>."
[2] "<<SLANG>> and a big <<SLANG>>! The weekend is <<SLANG>>!"
[3] "Will will do it"
[4] "<<SLANG>>...this <<SLANG>> needs me to say <<SLANG>>...<<SLANG>>."
[5] NA
[1] "Marc the {{ newbie }} needs to {{ read the fucking manual }} otherwise {{ your mileage may vary }}."
[2] "{{ thank god, it's friday }} and a big {{ hooray }}! The weekend is {{ great }}!"
[3] "Will will do it"
[4] "{{ wait }}...this {{ pain in the ass }} needs me to say {{ let me google that for you }}...{{ laughing my ass off }}."
[5] NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.