Description Usage Arguments Value See Also Examples
View source: R/make.filenames.R
Function replaces special symbols (\" / : * ? < > |) in
a string s with replacement (by default it is underscore
_). After replacement the string can be used as a file name
in Windows.
1 | make.filenames(s, replacement = "_", allow.space = TRUE)
|
s |
A string. |
replacement |
A symbol to replce unallowed symbols with.
|
allow.space |
Logical. If |
A string without special symbols.
Other spMisc utilities:
bru(),
clc(),
clear(),
fCap(),
isFALSE(),
list_AddRm(),
open_wd(),
printDuration(),
regexp2df(),
st01()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | s <- '\\ / : * ? " < > |'
make.filenames(s)
#> "_ _ _ _ _ _ _ _ _"
make.filenames(s, allow.space = FALSE)
#> "_________________"
s2 <- "/Hello?"
make.filenames(s2)
#> "_Hello_"
make.filenames(s2, replacement = "-")
#> "-Hello-"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.