fnamestamp: Extends a file name with a datetime stamp.

Description Usage Arguments Value Examples

Description

Returns a character string (the filename) with a datetime stamp appended for easy output file naming.

Usage

1
fnamestamp(fname = "NoName", asis = FALSE)

Arguments

fname

Name of the file, with or without the extension. The datetime stamp will be inserted just before the extension, or at the end if the file has no extension specified. An extension is any string after the last character dot in fname.

asis

Logical. If TRUE, the time stamp is appended at the end, even if an extension exists.

Value

A character string made up of the filename, the datetime stamp and the extension (located either before or after the datetime stamp).

Examples

1
2
fnamestamp('./my cool file name.pdf')
fnamestamp('./my other cool file name.pdf', asis=TRUE)

jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.