normalizeFilename {plotKML}R Documentation

Normalize filename string

Description

Remove all reserved characters from the file name.

Usage

normalizeFilename(x, form = c("default", "8.3")[1], 
                 fix.encoding = TRUE, sub.sign = "_")

Arguments

x

input character

form

target format (standard or the short 8.3 file name)

fix.encoding

logical; specifies whether to fix the encoding

sub.sign

substitution symbol

Details

This function removes all reserved characters: (less than), (greater than), (colon), (double quote), (forward slash), (backslash), (vertical bar or pipe), (question mark), (asterisk), and empty spaces, from the file name. This is important when writing a list of objects to an external file (e.g. KML) as it prevents from creating erroneous file names.

Author(s)

Tomislav Hengl

See Also

utils::shortPathName, RSAGA:set.file.extension

Examples

normalizeFilename("name[%].txt")
normalizeFilename("name .txt")

[Package plotKML version 0.5-9 Index]