createyRepo: Create an Empty Local Repository in a Given Directory

Description Usage Arguments Details Author(s) See Also Examples

Description

createRepo creates an empty Repository in a given directory in which archived artifacts will be stored.

Usage

1
createRepo(repoDir, force = TRUE, setAsDefault = TRUE)

Arguments

repoDir

A character that specifies the directory for the Repository to be made.

force

If force = TRUE function call forces to create repoDir directory if it did not exist. Default set to force = TRUE.

setAsDefault

If setAsDefault = TRUE newly created repo is set as the default one.

Details

At least one Repository must be initialized before using other functions from the archivist2 package. When working in groups, you share this directory with other users (vis dropbox), you can use github repository, or you can use remote/cloud repository. In local directory all artifacts are going to be saved in the local Repository folder, with an SQLite database attached in a file named backpack. After calling writeToRepo function, every artifact will be archived in a md5hash.rda file. This file will be saved in a folder (under repoDir directory) named gallery. For every artifact, md5hash is a unique string of length 32 that comes out as a result of digest function, which uses a cryptographical MD5 hash algorithm. To learn more about artifacts visit archivist2-package. Created backpack database is a useful and fundamental tool for remembering artifact's name, class, archiving date etc. (that are remembered as Tags), or for keeping artifact's md5hash. Besides the backpack database, gallery folder is created in which all artifacts will be archived. After every writeToRepo call the database is refreshed, so an artifact is available immediately in backpack.db database for other collaborators.

Author(s)

Marcin Kosinski, m.p.kosinski_at_gmail.com, Przemyslaw Biecek, przemyslaw.biecek_at_gmail.com

See Also

Other archivist2: readFromRepo; setRepo; writeToRepo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
exampleRepoDir <- tempdir()
createRepo( repoDir = exampleRepoDir )

# check the state of an empty Repository
summaryRepo(  repoDir = exampleRepoDir )

# removing an example Repositories
deleteRepo( exampleRepoDir )
rm( exampleRepoDir )

## End(Not run)

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