saveSetToRepo: Save a Set of Artifacts into a Repository

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/saveSetToRepo.R

Description

saveSetToRepo function saves desired set of artifacts to the local Repository in a given directory. To learn more about artifacts visit archivist- package. Set is a collection containing

Usage

1
2
3
4
saveSetToRepo(artifact, data, functions = list(), repoDir = NULL,
  archiveData = TRUE, archiveTags = TRUE, archiveMiniature = TRUE,
  force = TRUE, rememberName = TRUE, chain = FALSE, ..., silent = FALSE,
  ascii = FALSE)

Arguments

artifact

An arbitrary R artifact to be saved. For supported artifacts see details.

data

Data needed to compute artifact.

functions

Functions needed to compute artifact. List of them is the best form.

repoDir

It's passed to the saveToRepo. A character denoting an existing directory in which an artifact will be saved. If set to NULL (by default), uses the repoDir specified in setLocalRepo.

archiveData

It's passed to the saveToRepo. A logical value denoting whether to archive the data from the artifact.

archiveTags

It's passed to the saveToRepo. A logical value denoting whether to archive tags from the artifact.

archiveMiniature

It's passed to the saveToRepo. A logical value denoting whether to archive a miniature of the artifact.

force

It's passed to the saveToRepo. A logical value denoting whether to archive artifact if it was already archived in a Repository.

rememberName

It's passed to the saveToRepo. A logical value. Should not be changed by an user. It is a technical parameter.

chain

It's passed to the saveToRepo. A logical value. Should the result be (default chain = FALSE) the md5hash of an stored artifact or should the result be the input artifact (chain = TRUE), so that chaining code can be used. See examples.

...

It's passed to the saveToRepo. Graphical parameters denoting width and height of a miniature. See details.

silent

It's passed to the saveToRepo. If TRUE produces no warnings.

ascii

It's passed to the saveToRepo. A logical value. An ascii argument is passed to save function.

Details

saveSetToRepo archives artifact, data and functions using saveToRepo function but additionally it adds Tags to every part of a set in convention as:set:md5hashOfArtifact to remember that all objects came originally from one set. This additional tag helps to restore a set from a Repository

Value

As a result of this function a character strings is returned, which determines the md5hash of the archived artifact.

Author(s)

Marcin Kosinski , m.p.kosinski@gmail.com

See Also

For more detailed information check the archivist package Use Cases. The list of supported artifacts and their tags is available on wiki on archivist Github Repository.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 

# objects preparation
library(ggplot2)
library(ggthemes)
library(archivist)
createEmptyRepo( "SETS" )
setLocalRepo( "SETS" )
data(iris)

plotArtifact <- ggplot( iris, aes(x = Sepal.Length, y = Species)) +
  geom_point()+
  theme_wsj()

plotData <- iris
plotFunctions <- list( ggplot, geom_point, theme_wsj)

# storing
saveSetToRepo( artifact = plotArtifact,
   data = plotData,
   functions = plotFunctions)

# show method for set
showLocalRepo(method = "sets")

## End(Not run)

pbiecek/archivist2 documentation built on May 24, 2019, 10:36 p.m.