Learn R Programming

ggfigdone (version 0.1.2)

fd_init: Initiates the ggfigdone database

Description

This function generates a folder that serves as a database for ggfigdone.

Usage

fd_init(dir, recursive = TRUE, rm_exist = FALSE, set_default = TRUE, ...)

Value

An object of class fdObj.

Arguments

dir

A character string specifying the directory path.

recursive

A logical value. If TRUE, the function will create the directory along with any necessary parent directories if they do not already exist. If FALSE, the function will create the directory only if its parent directory already exists.

rm_exist

A logical value. If TRUE, the function will remove the content in the directory if it already exists. If FALSE, the function will ask the user whether to remove the content in the directory.

set_default

A logical value. If TRUE, the function will set the database as the default database.

...

Additional arguments to be passed to fd_load function.

Examples

Run this code
library(ggplot2)
## create ggfigdone database in a temporary directory
db_dir = file.path(tempdir(), "fd_init")

## Initate the ggfigdone database
fd_init(db_dir, rm_exist = TRUE)

Run the code above in your browser using DataLab