as.character.filename: Coerce a character to a filename

View source: R/filename.R

as.character.filenameR Documentation

Coerce a character to a filename

Description

This function coerces a filename into a character.

Usage

## S3 method for class 'filename'
as.character(x, tag.char = NULL, simplify = FALSE, sanitize = TRUE, ...)

Arguments

x

a filename object

tag.char

character to delimit tags, defaults to '_'

simplify

if TRUE, all timestamps are omitted

sanitize

if TRUE, file name is sanitized by removing problematic characters, replacing whitespace, and converting to lowercase

...

unused arguments

Value

a character vector

Examples

x <- "data_post_2011-01-02.txt"
fn <- as.filename(x)
print(as.character(fn))


filenamer documentation built on April 11, 2025, 5:46 p.m.