#'@title
#' create a date versioned file name, just a wrapper for timestamp
#'
#'@description
#' create a date versioned file name leveragin timestamp function and data format codes
#'
#'@details
#'
#' create a date versioned file name leveraging existing timestamp function and data format codes
#' #'
#'
#' This program is free software but it is provided WITHOUT WARRANTY
#' and with ABSOLUTELY NO GUARANTEE of fitness or functionality for any purpose;
#' you can redistribute it and/or modify it under the terms of the GNU
#' General Public License as published by the Free Software Foundation;
#' either version 2 of the License, or (at your option) any later version.
#'
#'\cr
#'Revision History
#' \tabular{ll}{
#'1.0 \tab Implemented \cr
#'}
#'
#'@author
#'
#'Some Body <some.body@@somewhere.com>
#'
#'@param stamp how to label file - default is a custom format time
#'@param prefix file path or other
#'@param suffix file extesion
#'@param quiet If TRUE, suppress printing filestamp to the console
#'
#'@return
#' character string with some new d
#'
#'@examples
#'
#' filestamp()
#' filestamp(format(Sys.time(), "%Y_%m_%d_%H%M%S"))
#' filestamp("1.1")
#' filestamp("V1.1",prefix = "c:/temp/project1/myfile_",suffix=".RDS")
#'
#'
#'@export
#
#'@seealso \code{\link{timestamp}}\cr \code{\link{format}}\cr \code{\link{Sys.time}}\cr
#the code below with a single comment symbol is not part of the official roxygen code
#
#Desired upgrades to this function (keep track of planned updates):
#1.
#2.
#3.
#4.
#
#Help to set up param documentation above
# 1. Select function parameters, in this example case just "x,y,...", arguments should be on separate line
# 2. select the code starting with writeClipboard(...) below without comment (hash symbol) and run
# 3. paste parameters into @param section above
#
# writeClipboard(paste(gsub("^[[:space:]]*[,]*","#'@param ",gsub("=.*"," ?",readClipboard())),collapse="\n"))
#rename function and add guts
filestamp = function(
stamp = format(Sys.time(), "%Y%m%d%H%M%S")
,prefix = "c:/temp/somefile_V"
,suffix = ".csv"
,quiet = F
)
{
timestamp(stamp=stamp, prefix=prefix,suffix = suffix, quiet=quiet)
}
filestamp()
filestamp(format(Sys.time(), "%Y_%m_%d_%H%M%S"))
filestamp("1.1")
filestamp("V1.1",prefix = "c:/temp/project1/myfile_",suffix=".RDS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.