camr_name_file: Generate a Standardized File Name

View source: R/R02-Files_and_paths.R

camr_name_fileR Documentation

Generate a Standardized File Name

Description

Function to generate a file name of the form project-description-date-time-commit.extension.

Usage

camr_name_file(
  description,
  extension = NULL,
  project = NULL,
  date = NULL,
  time = NULL,
  datetime = NULL,
  git = TRUE
)

camr_file_name(...)

Arguments

description

A character string giving a brief description or human-readable name for the file (preferably in the format File_name).

extension

An optional character string giving the file extension sans period. If NULL defaults to RData.

project

An optional character string with the project label. If NULL will attempt to extract from an environment variable (CAMR_PROJECT) or a project-level config file.

date

An optional character string giving the date (typically in the format YYYY_MM_DD).

time

An optional character string giving the time (typically in the format HH_MM_SS).

datetime

An optional character string giving both the date and time (typically in the format YYYY_MM_DD-HH_MM_SS).

git

Logical; if TRUE includes the most recent commit number.

Value

A character string, a file name of the form project-description-date-time-commit.extension.

Author(s)

Michael Pascale, Kevin Potter


rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.