diff --git a/DESCRIPTION b/DESCRIPTION index 3a5c4bd..5e07c12 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,10 @@ Package: ggfigdone -Title: Manage & Modify Ggplot Figures using Ggfigdone +Title: Manage & Modify 'ggplot' Figures using 'ggfigdone' Version: 0.1.2 Authors@R: person("Wenjie", "SUN", , "sunwjie@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3100-2346")) -Description: When you prepare a presentation or a report, you often need to manage a large number of ggplot figures. You need to change the figure size, modify the title, label, themes, etc. It is inconvenient to go back to the original code to make these changes. This package provides a simple way to manage ggplot figures. You can easily add the figure to the database and update them later using CLI (command line interface) or GUI (graphical user interface). +Description: When you prepare a presentation or a report, you often need to manage a large number of 'ggplot' figures. You need to change the figure size, modify the title, label, themes, etc. It is inconvenient to go back to the original code to make these changes. This package provides a simple way to manage 'ggplot' figures. You can easily add the figure to the database and update them later using CLI (command line interface) or GUI (graphical user interface). License: GPL-3 Encoding: UTF-8 Depends: R (>= 4.0.0) @@ -20,5 +20,4 @@ Imports: Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Suggests: testthat (>= 3.0.0), knitr -URL: https://github.com/wenjie1991/ggfigdone, https://wenjie1991.github.io/ggfigdone/ BugReports: https://github.com/wenjie1991/ggfigdone/issues diff --git a/R/lib.R b/R/lib.R index e0c3ccd..4887230 100644 --- a/R/lib.R +++ b/R/lib.R @@ -11,6 +11,7 @@ #' Set the default ggfigdone database #' #' @param fdObj An object of class `fdObj` to be set as the default ggfigdone database. +#' @return No return value, the default ggfigdone database is set to an environment variable. #' @export fd_set_db = function(fdObj) { .db$set(fdObj) @@ -18,6 +19,7 @@ fd_set_db = function(fdObj) { #' Get the default ggfigdone database #' +#' @return An object of class `fdObj` representing the default ggfigdone database. #' @export fd_get_db = function() { .db$get() @@ -214,7 +216,7 @@ fd_update = function(fdObj_loc, do_lock = TRUE) { #' #' @param fdObj An object of class `fdObj`. #' @param do_lock A logical value. If TRUE, the function will lock the database file when saving the data. -#' +#' @return No return value, changes are made directly to the ggfigdone database. #' @export fd_save = function(fdObj = fd_get_db(), do_lock = TRUE) { message("Automatic saving the ggfigdone data to the disk ...") @@ -472,7 +474,7 @@ fd_add = function(name, g = last_plot(), fdObj = fd_get_db(), height = 10, units = "cm", dpi = 200, - overwrite = F, + overwrite = FALSE, id = uuid::UUIDgenerate()) { fd_update(fdObj) @@ -605,6 +607,7 @@ fd_df = function(fdObj = fd_get_db()) { #' #' @param id A character string representing the figure ID. #' @param fdObj An object of class `fdObj`. +#' @return No return value, changes are made directly to the ggfigdone database. #' @export fd_rm = function(id, fdObj = fd_get_db()) { fd_update(fdObj) @@ -668,6 +671,7 @@ fd_update_fig = function(id, expr, fdObj = fd_get_db()) { #' @param height A numeric value specifying the height of the canvas. #' @param units A character string indicating the units of measurement for the canvas, such as "cm", "in", "mm", or "px". #' @param dpi A numeric value denoting the dots per inch (DPI) of the canvas. +#' @return No return value, changes are made directly to the ggfigdone database. #' @export fd_canvas = function( id, diff --git a/R/server.R b/R/server.R index f215254..626d0b8 100644 --- a/R/server.R +++ b/R/server.R @@ -155,6 +155,7 @@ response_fd_rm = function(fo, req) { #' @param host The host on which the server will run; the default is '0.0.0.0'. #' @param port The port on which the server will run; the default is 8080. #' @param auto_open A logical value indicating whether the server should be opened in a web browser; the default is TRUE. +#' @return No return value, the function is called for its side effects. #' @export fd_server = function(dir, host = '0.0.0.0', port = 8080, auto_open = TRUE) { fo = fd_load(dir) diff --git a/man/fd_add.Rd b/man/fd_add.Rd index fe6940f..c081254 100644 --- a/man/fd_add.Rd +++ b/man/fd_add.Rd @@ -12,7 +12,7 @@ fd_add( height = 10, units = "cm", dpi = 200, - overwrite = F, + overwrite = FALSE, id = uuid::UUIDgenerate() ) } diff --git a/man/fd_canvas.Rd b/man/fd_canvas.Rd index 5507878..8cf4374 100644 --- a/man/fd_canvas.Rd +++ b/man/fd_canvas.Rd @@ -26,6 +26,9 @@ fd_canvas( \item{dpi}{A numeric value denoting the dots per inch (DPI) of the canvas.} } +\value{ +No return value, changes are made directly to the ggfigdone database. +} \description{ This function is designed to update the size of the figure canvas. } diff --git a/man/fd_get_db.Rd b/man/fd_get_db.Rd index 9b79eb9..ba28982 100644 --- a/man/fd_get_db.Rd +++ b/man/fd_get_db.Rd @@ -6,6 +6,9 @@ \usage{ fd_get_db() } +\value{ +An object of class \code{fdObj} representing the default ggfigdone database. +} \description{ Get the default ggfigdone database } diff --git a/man/fd_rm.Rd b/man/fd_rm.Rd index adda0b2..bf54dcb 100644 --- a/man/fd_rm.Rd +++ b/man/fd_rm.Rd @@ -11,6 +11,9 @@ fd_rm(id, fdObj = fd_get_db()) \item{fdObj}{An object of class \code{fdObj}.} } +\value{ +No return value, changes are made directly to the ggfigdone database. +} \description{ This function removes a figure from the ggfigdone database. } diff --git a/man/fd_save.Rd b/man/fd_save.Rd index 6333d16..8b9f97a 100644 --- a/man/fd_save.Rd +++ b/man/fd_save.Rd @@ -11,6 +11,9 @@ fd_save(fdObj = fd_get_db(), do_lock = TRUE) \item{do_lock}{A logical value. If TRUE, the function will lock the database file when saving the data.} } +\value{ +No return value, changes are made directly to the ggfigdone database. +} \description{ This function saves the ggfigdone data to the disk. By default, when using the \code{\link[ggfigdone]{fd_load}} funciton to load the databse, the data will be automatically saved to the disk when changes are made. diff --git a/man/fd_server.Rd b/man/fd_server.Rd index f756faf..8fae9aa 100644 --- a/man/fd_server.Rd +++ b/man/fd_server.Rd @@ -15,6 +15,9 @@ fd_server(dir, host = "0.0.0.0", port = 8080, auto_open = TRUE) \item{auto_open}{A logical value indicating whether the server should be opened in a web browser; the default is TRUE.} } +\value{ +No return value, the function is called for its side effects. +} \description{ This function initiates a server for ggfigdone, which can be accessed through a web browser. The web application enables users to manage and modify ggplot figures with ease. diff --git a/man/fd_set_db.Rd b/man/fd_set_db.Rd index 4b7bcfe..f2201e3 100644 --- a/man/fd_set_db.Rd +++ b/man/fd_set_db.Rd @@ -9,6 +9,9 @@ fd_set_db(fdObj) \arguments{ \item{fdObj}{An object of class \code{fdObj} to be set as the default ggfigdone database.} } +\value{ +No return value, the default ggfigdone database is set to an environment variable. +} \description{ Set the default ggfigdone database } diff --git a/man/ggfigdone.Rd b/man/ggfigdone.Rd index 9c0b72d..7860fa4 100644 --- a/man/ggfigdone.Rd +++ b/man/ggfigdone.Rd @@ -18,8 +18,6 @@ Figures can be easily added to the database and subsequently updated using eithe \seealso{ Useful links: \itemize{ - \item \url{https://github.com/wenjie1991/ggfigdone} - \item \url{https://wenjie1991.github.io/ggfigdone/} \item Report bugs at \url{https://github.com/wenjie1991/ggfigdone/issues} }