Description Usage Arguments Details Value Examples
rm_invalid
Removes invalid excel sheet special characters.
1 | rm_invalid(x)
|
x |
A string or vector of strings. |
rm_invalid
is useful if you are writing sheets to excel. Excel will not allow certain special characters in sheet names.
Invalid characters include colons, square brackets, asterisks, question marks, vertical bars, new lines and tabs.
x
with invalid characters removed.
1 2 3 4 5 6 7 8 | rm_invalid(c("excel sheet* example[]: a fake string", "another test::"))
library(xlsx)
string <- "Table* [5]?"
df <- data.frame(foo = 1:3, bar = 1:3)
sName <- rm_invalid(string)
write.xlsx(df, "foo.xlsx", string) #Will throw error
write.xlsx(df, "foo.xlsx", sName) #No error
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.