Learn R Programming

filenamer (version 0.3)

as.filename: Coerce to a filename

Description

This function coerces an object into a filename, if possible.

Usage

as.filename(x, ...)

# S3 method for filename as.filename(x, ...)

# S3 method for character as.filename(x, tag.char = NULL, ...)

Value

a filename object

Arguments

x

a character or a filename

...

other arguments

tag.char

character to delimit tags, defaults to '_'

Examples

Run this code
fn <- as.filename("data_raw_2011-01-01.txt")
str(fn)

Run the code above in your browser using DataLab