makeFigName: Create a file name.

Description Usage Arguments Details Value Author(s) Examples

View source: R/file-names.R

Description

Creates a file name given a prefix and other optional paramters for a figure or data file. Also checks if file exists.

Usage

1
2
3
4
5
makeFigName(prefix, ext = "pdf", prefix0 = "Fig", date = TRUE,
  path = ".")

makeDatName(prefix, ext = "rda", prefix0 = "Dat", date = TRUE,
  path = ".")

Arguments

prefix

A file specific prefix.

ext

The extension; default is pdf for a figure and rda for a data file.

prefix0

The general prefix for figures. Default is Fig for a figure and Dat for a data file.

date

Should the data (as reported by date) be used as part of the file name? Default is TRUE.

path

The path to the file. Default is ".".

Details

TODO: If file exists, create the next increment.

Value

A character with the figure file name.

Author(s)

Laurent Gatto

Examples

1
2
3
4
5
makeFigName("foo")
makeFigName("foo", date = FALSE)
makeDatName("foo", date = FALSE)
makeFigName("foo", path = "~/projects/big-project/figs")
makeDatName("foo", path = "~/projects/big-project/Data")

ComputationalProteomicsUnit/cputools documentation built on May 6, 2019, 12:50 p.m.