Skip to content

Commit

Permalink
[doc] tyding, add \value tag
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjie1991 committed Sep 10, 2024
1 parent f04f370 commit 7f3f9e2
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 8 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", 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)
Expand All @@ -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
8 changes: 6 additions & 2 deletions R/lib.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
#' 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)
}

#' Get the default ggfigdone database
#'
#' @return An object of class `fdObj` representing the default ggfigdone database.
#' @export
fd_get_db = function() {
.db$get()
Expand Down Expand Up @@ -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 ...")
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion man/fd_add.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/fd_canvas.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/fd_get_db.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/fd_rm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/fd_save.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/fd_server.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/fd_set_db.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/ggfigdone.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7f3f9e2

Please sign in to comment.