replace_spaces | R Documentation |
Replace spaces in all elements of a character vector with underscores
replace_spaces(x, new_char = "_")
x |
a character vector |
new_char |
the character to replace spaces (default: |
character vector with all spaces replaced with new_char
Kelly Sovacool, sovacool@umich.edu
dat <- data.frame(
dx = c("outcome 1", "outcome 2", "outcome 1"),
a = 1:3, b = c(5, 7, 1)
)
dat$dx <- replace_spaces(dat$dx)
dat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.