Hello,
Here are 2 examples, one with stringr::str_remove_all and the other with
base gsub. I am assuming that you want to remove the spaces from column
'servicer'.
dat <- data.frame(x = rnorm(2),
servicer = c("a b c", " d efg"),
fctrdt = 1:2)
dat
library
I don't use dplyr, but it's trivial with gsub, assuming I understand
correctly:
> x <- "a b\t c\n e"
> cat(x)
a b c
e
> gsub("[[:space:]]", "",x)
[1] "abce"
See ?regex for details (of course!), especially the section on character
classes.
Bert Gunter
"The trouble with having an open mind is
All,
This may not be the proper place to ask as the question is dplyr and removing
white space using mutate. My code is below:
```{r, echo = FALSE, message = FALSE
conn <- myconnection
```{r, echo = FALSE, message=FALSE}
fhlloanbalance <- tbl(conn, "fhlloan_balance_view")
colnames(fhlloa
3 matches
Mail list logo