loadFromRepo: Read an Artifact from a Repository

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

Description

readFromRepo reads an artifact from a local, GitHub or remote Repository To learn more about artifacts visit archivist2-package.

Usage

1
readFromRepo(md5hash, repo = NULL, value = FALSE)

Arguments

md5hash

A character assigned to the artifact as a result of a cryptographical hash function with MD5 algorithm, or it's abbreviation.

repo

A character denoting an existing repository from which an artifact will be loaded. If set to NULL (by default), uses the default repository specified in setRepo.

value

If FALSE then artifacts are loaded into the Global Environment with their original names, if TRUE (default) then artifacts are returned as a list of values (if there is more than one artifact) or as a single value (if there is only one arfifact that matches md5hash).

Details

Functions readFromRepo reads artifacts from the archivist Repositories stored in a local folder or on Github or remotely. It takes md5hash as a hook of an artifact, which is a result from writeToRepo function. 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. For more information see md5hash. Important: instead of giving the whole md5hash character, the user can simply give first few characters of the md5hash. For example, a09dd instead of a09ddjdkf9kj33dcjdnfjgos9jd9jkcv. All artifacts with the same corresponing md5hash abbreviation will be loaded from Repository. NOTE: in remote repo only the first match is returned and warrning is triggered. One may notice that writeToRepo remembers the original artifact name. By default the readFromRepo() returns the value, but by setting value = FALSE you will force this function to load the artifact directly into the parent environemnt.

Note

You can specify one md5hash (or its abbreviation) per function call.

Author(s)

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

See Also

Other archivist2: createRepo; setRepo; writeToRepo

Examples

1
2
3
4
## Not run: 
# TODO: create examples or move from archivist

## End(Not run)

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