Allow piping
tspeidel opened this issue · 2 comments
tspeidel commented
Great package! Any chance you can support piping and make it more tidy compliant?
e.g.
library(textclean)
library(dplyr)
x <- c("i like", "<p>i want. </p>. thet them ther .", "I am ! that|", "", NA,
""they" they,were there", ".", " ", "?", "3;", "I like goud eggs!",
"bi\xdfchen Z\xfcrcher", "i 4like...", "\\tgreat", "She said \"yes\"")
x <- as.data.frame(x)
x <- x %>%
rename(text = x) %>%
strip(text, char.keep = c("?", ".")) %>%
replace_non_ascii(text) %>%
replace_symbol(text)
Error in as.logical(test) :
cannot coerce type 'closure' to vector of type 'logical'
trinker commented
Can't you use it inside of a mutate? This is in keeping with the tidyverse.
…On Thu, Aug 2, 2018, 5:50 PM Thomas Speidel ***@***.***> wrote:
Great package! Any chance you can support *piping* and make it more tidy
compliant?
e.g.
library(textclean)
library(dplyr)
x <- c("i like", "<p>i want. </p>. thet them ther .", "I am ! that|", "", NA,
""they" they,were there", ".", " ", "?", "3;", "I like goud eggs!",
"bi\xdfchen Z\xfcrcher", "i 4like...", "\\tgreat", "She said \"yes\"")
x <- as.data.frame(x)
x <- x %>%
rename(text = x) %>%
strip(text, char.keep = c("?", ".")) %>%
replace_non_ascii(text) %>%
replace_symbol(text)
Error in as.logical(test) :
cannot coerce type 'closure' to vector of type 'logical'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#42>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABrnzrCKttN-qP15ywn_sYgWEGdDsIl0ks5uM3QrgaJpZM4VtD0I>
.
tspeidel commented
I'm sorry, it does work.