Learn R Programming

RSAGA (version 1.4.2)

create.variable.name: Convert file name to variable name

Description

Convert a file name into a variable name

Usage

create.variable.name(filename, prefix = NULL, fsep = .Platform$file.sep)

Value

character string: a variable name, see example below

Arguments

filename

character string

prefix

character string: optional prefix to be added

fsep

character used to separate path components

Examples

Run this code
if (FALSE) {
create.variable.name("C:/my-path/my-file-name.Rd",prefix="res")
# Result: "res.my.file.name"
}

Run the code above in your browser using DataLab