addTagsRepo
adds new Tags to the existing Repository.addTagsRepo(md5hashes, repoDir = NULL, FUN = NULL, tags = NULL, ...)
Tags
be added.Tags
will be added. If set to NULL
(by default), uses the repoDir
specified in setLocalRepo.md5hashes
are given and generates
Tags
as a result that will be added to the local Repository. Can be specified only one of: FUN
or tags
.md5hash
. Can be specified only one of: FUN
or tags
. Should have length 1 or the same as length of md5hashes
addTagsRepo
function adds new tags to artifacts that are already stored in repository.
One can add new tags
explicitly with tags
argument, or by passing a
function that extracts tags
from selected artifacts specified by passing their md5hash.
To learn more about artifacts visit archivist-package.Tags
are attributes of an artifact. Tags
can be an artifact's name
, class
or archiving date
.
Furthermore, for various artifact's classes more different Tags
are available and can
be searched in searchInLocalRepo or searchInGithubRepo functions.
Repository
;
Tags
; %a%
;
ahistory
, print.ahistory
;
aoptions
; archivist-package
;
aread
; asearch
;
cache
; copyGithubRepo
,
copyLocalRepo
;
createEmptyRepo
; deleteRepo
;
getTagsGithub
, getTagsLocal
;
loadFromGithubRepo
,
loadFromLocalRepo
; md5hash
;
multiSearchInGithubRepo
,
multiSearchInLocalRepo
,
searchInGithubRepo
,
searchInLocalRepo
;
rmFromRepo
; saveSetToRepo
;
saveToRepo
; setGithubRepo
,
setLocalRepo
;
shinySearchInLocalRepo
;
showGithubRepo
,
showLocalRepo
;
summaryGithubRepo
,
summaryLocalRepo
;
zipGithubRepo
, zipLocalRepo
# Takes all objects of lm class from repository,
# extracts R2 for them and stores as R2: tags
exampleRepoDir <- tempdir()
createEmptyRepo(exampleRepoDir, force=TRUE)
m1 <- lm(Sepal.Length~Species, iris)
saveToRepo(m1, exampleRepoDir)
m1 <- lm(Sepal.Width~Species, iris)
saveToRepo(m1, exampleRepoDir)
getTagsLocal("da1bcaf68752c146903f700c1a458438", exampleRepoDir, "")
md5hashes <- searchInLocalRepo(repoDir=exampleRepoDir, "class:lm")
addTagsRepo(md5hashes, exampleRepoDir, tags = "test")
addTagsRepo(md5hashes, exampleRepoDir, function(x) paste0("R2:",summary(x)$r.square))
getTagsLocal("da1bcaf68752c146903f700c1a458438", exampleRepoDir, "")
showLocalRepo(exampleRepoDir)
deleteRepo(exampleRepoDir)
Run the code above in your browser using DataLab