33# ' Used to change the class of inputs to "gsplot".
44# '
55# ' @param x list
6+ # ' @param created vector of length one giving the date the gsplot object was created. Defaults to
7+ # ' using \code{Sys.Date()}. Output class matches that of the input.
8+ # ' @param gsplot.version vector of length one giving the version of the gsplot package used to create the
9+ # ' object. Defaults to calling \code{packageDescription()}. Output class matches that of the input.
610# ' @param config.file path to the file that will only be used for setting
711# ' par in this one gsplot object. If \code{NA} (default), par is set by the global options set by
812# ' loadConfig().
@@ -19,8 +23,12 @@ gsplot <- function(x = NULL, ...) UseMethod("gsplot")
1923
2024# ' @rdname gsplot
2125# ' @export
22- gsplot.default <- function (... ,config.file = NA , theme = NA , frame.plot = TRUE ) {
23- object <- gsplot(list (global = list (' config' = list (frame.plot = frame.plot ,
26+ gsplot.default <- function (... , created = Sys.Date(),
27+ gsplot.version = packageDescription(" gsplot" , fields = " Version" ),
28+ config.file = NA , theme = NA , frame.plot = TRUE ) {
29+ object <- gsplot(list (metadata = list (created = created ,
30+ gsplot.version = gsplot.version ),
31+ global = list (' config' = list (frame.plot = frame.plot ,
2432 config.file = ! is.na(config.file ),
2533 theme = ! is.na(theme )))))
2634
0 commit comments