filename_strip_illegal_characters | R Documentation |
from filename minus extension, replace illegal characters (allowed are alphanumeric, underscore and dash)
filename_strip_illegal_characters(f, strict = FALSE, replacement = "_")
f |
f can either be a filename or a full path |
strict |
boolean, if TRUE; only allow alphanumeric, underscore and '-' |
replacement |
string replacement value for removed characters |
## Not run:
# nothing to do
filename_strip_illegal_characters("test.txt")
filename_strip_illegal_characters("C:/temp/test.txt")
# fix filename
filename_strip_illegal_characters("C:/temp/test !~: file.txt", strict = F)
# example emphasizes that this function only applies to filename
filename_strip_illegal_characters("C:/temp/this is ok/not ok.txt", strict = T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.