View source: R/makeFilenames.R
makeFilenames | R Documentation |
This is a function (make.filenames) from https://github.com/GegznaV/spMisc
repository.
This 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.
makeFilenames(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.
s <- '\\ / : * ? " < > |'
makeFilenames(s)
#> "_ _ _ _ _ _ _ _ _"
makeFilenames(s, allow.space = FALSE)
#> "_________________"
s2 <- "/Hello?"
makeFilenames(s2)
#> "_Hello_"
makeFilenames(s2, replacement = "-")
#> "-Hello-"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.