archivist (version 1.2)

getTagsLocal: Return a Tag Corresponding to md5hash

Description

getTagsLocal and getTagsGithub return a Tag (see Tags) related to md5hash of an artifact. To learn more about artifacts visit archivist-package.

Usage

getTagsLocal(md5hash, repoDir, tag = "name")

getTagsGithub(md5hash, user, repo, branch = "master", repoDirGit = FALSE, tag = "name")

Arguments

md5hash
A character containing md5hash of artifacts which Tag is desired to be returned.
repoDir
A character denoting an existing directory in which an artifact is stored.
tag
A type of a Tags. Default tag = "name".
user
Only if working with a Github repository. A character containing a name of a Github user on whose account the repo is created.
repo
Only if working with a Github repository. A character containing a name of a Github repository on which the Repository is archived.
branch
Only if working with a Github repository. A character containing a name of Github repository's branch in which Repository is archived. Default branch is master.
repoDirGit
Only if working with a Github repository. A character containing a name of a directory on Github repository on which the Repository is stored. If the Repository is stored in main folder on Github repository, this should be set to repoDirGit

Value

  • The character is returned, which is a Tag (see Tags) related to md5hash of an artifact.

Details

getTagsLocal and getTagsGithub return (see Tags) related to md5hash of an artifact. To learn more about artifacts visit archivist-package.

See Also

Other archivist: Repository; Tags; addTagsRepo; archivist-package; cache; copyGithubRepo, copyLocalRepo; createEmptyRepo; deleteRepo; loadFromGithubRepo, loadFromLocalRepo; md5hash; multiSearchInGithubRepo, multiSearchInLocalRepo, searchInGithubRepo, searchInLocalRepo; rmFromRepo; saveToRepo; shinySearchInLocalRepo; showGithubRepo, showLocalRepo; summaryGithubRepo, summaryLocalRepo; zipGithubRepo, zipLocalRepo

Other archivist: Repository; Tags; addTagsRepo; archivist-package; cache; copyGithubRepo, copyLocalRepo; createEmptyRepo; deleteRepo; loadFromGithubRepo, loadFromLocalRepo; md5hash; multiSearchInGithubRepo, multiSearchInLocalRepo, searchInGithubRepo, searchInLocalRepo; rmFromRepo; saveToRepo; shinySearchInLocalRepo; showGithubRepo, showLocalRepo; summaryGithubRepo, summaryLocalRepo; zipGithubRepo, zipLocalRepo

Examples

Run this code
library(dplyr)
exampleRepoDir <- tempdir()
createEmptyRepo( exampleRepoDir )

data(mtcars)
hash <- mtcars %.%
 group_by(cyl, am) %.%
 select(mpg, cyl, wt, am) %.%
 summarise(avgmpg = mean(mpg), avgwt = mean(wt)) %.%
 filter(avgmpg > 20) %>%
 saveToRepo( exampleRepoDir )

getTagsLocal( md5hash = hash, exampleRepoDir )

deleteRepo( exampleRepoDir )
rm( exampleRepoDir )

getTagsGithub( "3db63bc63b8defaf42c0bde19160f242",
   user="pbiecek", repo="archivist")

# many archivist-like Repositories on one Github repository

getTagsGithub("ff575c261c949d073b2895b05d1097c3", user="MarcinKosinski",
repo="Museum", branch="master", repoDirGit="ex1")

Run the code above in your browser using DataCamp Workspace