add_endpoint: Add endpoint to WORCS project

View source: R/endpoint.R

add_endpointR Documentation

Add endpoint to WORCS project

Description

Add a specific endpoint to the WORCS project file. Endpoints are files that are expected to be exactly reproducible (e.g., a manuscript, figure, table, et cetera). Reproducibility is checked by ensuring the endpoint's checksum is unchanged.

Usage

add_endpoint(filename = NULL, worcs_directory = ".", verbose = TRUE, ...)

Arguments

filename

Character, indicating the file to be tracked as endpoint. Default: NULL.

worcs_directory

Character, indicating the WORCS project directory to which to save data. The default value "." points to the current directory. Default: '.'

verbose

Logical. Whether or not to print status messages to the console. Default: TRUE

...

Additional arguments.

Value

No return value. This function is called for its side effects.

See Also

snapshot_endpoints check_endpoints

Examples

# Create directory to run the example
old_wd <- getwd()
test_dir <- file.path(tempdir(), "add_endpoint")
dir.create(test_dir)
setwd(test_dir)
file.create(".worcs")
writeLines("test", "test.txt")
add_endpoint("test.txt")
# Cleaning example directory
setwd(old_wd)
unlink(test_dir, recursive = TRUE)

worcs documentation built on Sept. 14, 2024, 5:06 p.m.