
searchInRepo
searches for an artifact in the Repository using it's Tags.
To learn more about artifacts visit archivistPackage.
searchInLocalRepo(
pattern,
repoDir = aoptions("repoDir"),
fixed = TRUE,
intersect = TRUE
)searchInRemoteRepo(
pattern,
repo = aoptions("repo"),
user = aoptions("user"),
branch = "master",
subdir = aoptions("subdir"),
repoType = aoptions("repoType"),
fixed = TRUE,
intersect = TRUE
)
multiSearchInLocalRepo(...)
multiSearchInRemoteRepo(...)
searchInRepo
returns character vector of md5hashes
of artifacts that were searched for.
Those are hashes assigned to artifacts while they were saved in the Repository
by the saveToLocalRepo function. If the artifact
is not in the Repository then a logical value FALSE
is returned.
If fixed = TRUE
: a character denoting a Tag
which is to be searched for in the Repository.
It is also possible to specify pattern
as a list of
length 2 with dateFrom
and dateTo
; see details. If fixed = FALSE
: a regular expression
specifying the beginning of a Tag
, which will be used to search for artifacts. If of length more than one and if
intersect = TRUE
then artifacts that match all conditions are returned. If intersect = FALSE
then artifacts that match any condition
are returned. See examples.
A character denoting an existing directory in which artifacts will be searched for.
A logical value specifying how artifacts
should be searched for.
If fixed = TRUE
(default) then artifacts are searched for by using pattern = "Tag"
argument.
If fixed = FALSE
then artifacts are searched for by using pattern = "regular expression"
argument.
The latter is wider and more flexible method, e.g.,
using pattern = "name", fixed = FALSE
arguments enables to search for all artifacts in the Repository
.
A logical value. Used only when length(pattern) > 1 & is.character(pattern)
.
See pattern
for more details.
While working with the Remote repository. A character containing a name of the Remote repository on which the Repository is stored.
By default set to NULL
- see Note
.
While working with the Remote repository. A character containing a name of the Remote user on whose account the repo
is created.
By default set to NULL
- see Note
.
While working with the Remote repository. A character containing a name of
the Remote Repository's branch on which the Repository is stored. Default branch
is master
.
While working with the Remote repository. A character containing a name of a directory on the Remote repository
on which the Repository is stored. If the Repository is stored in the main folder of the Remote repository, this should be set
to subdir = "/"
as default.
A character containing a type of the remote repository. Currently it can be 'github' or 'bitbucket'.
Used for old deprecated functions.
Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues
Marcin Kosinski, m.p.kosinski@gmail.com
searchInRepo
searches for an artifact in the Repository using it's Tag
(e.g., name
, class
or archiving date
). Tags
are used in a pattern
parameter. For various artifact classes different Tags
can be searched for.
See Tags. If a pattern
is a list of length 2 then md5hashes
of all
artifacts created from date dateFrom
to date dateTo
are returned. The date
should be formatted according to the YYYY-MM-DD format, e.g., "2014-07-31"
.
Tags
, used in a pattern
parameter, should be determined according to the
format: "TagKey:TagValue"
- see examples.
Biecek P and Kosinski M (2017). "archivist: An R Package for Managing, Recording and Restoring Data Analysis Results." _Journal of Statistical Software_, *82*(11), pp. 1-28. doi: 10.18637/jss.v082.i11 (URL: http://doi.org/10.18637/jss.v082.i11). URL https://github.com/pbiecek/archivist
Other archivist:
Repository
,
Tags
,
%a%()
,
addHooksToPrint()
,
addTagsRepo()
,
aformat()
,
ahistory()
,
alink()
,
aoptions()
,
archivistPackage
,
aread()
,
areadLocal()
,
asearch()
,
asearchLocal()
,
asession()
,
atrace()
,
cache()
,
copyLocalRepo()
,
createLocalRepo()
,
createMDGallery()
,
deleteLocalRepo()
,
getRemoteHook()
,
getTagsLocal()
,
loadFromLocalRepo()
,
md5hash
,
removeTagsRepo()
,
restoreLibs()
,
rmFromLocalRepo()
,
saveToLocalRepo()
,
setLocalRepo()
,
shinySearchInLocalRepo()
,
showLocalRepo()
,
splitTagsLocal()
,
summaryLocalRepo()
,
zipLocalRepo()
Other archivist:
Repository
,
Tags
,
%a%()
,
addHooksToPrint()
,
addTagsRepo()
,
aformat()
,
ahistory()
,
alink()
,
aoptions()
,
archivistPackage
,
aread()
,
areadLocal()
,
asearch()
,
asearchLocal()
,
asession()
,
atrace()
,
cache()
,
copyLocalRepo()
,
createLocalRepo()
,
createMDGallery()
,
deleteLocalRepo()
,
getRemoteHook()
,
getTagsLocal()
,
loadFromLocalRepo()
,
md5hash
,
removeTagsRepo()
,
restoreLibs()
,
rmFromLocalRepo()
,
saveToLocalRepo()
,
setLocalRepo()
,
shinySearchInLocalRepo()
,
showLocalRepo()
,
splitTagsLocal()
,
summaryLocalRepo()
,
zipLocalRepo()
Other archivist:
Repository
,
Tags
,
%a%()
,
addHooksToPrint()
,
addTagsRepo()
,
aformat()
,
ahistory()
,
alink()
,
aoptions()
,
archivistPackage
,
aread()
,
areadLocal()
,
asearch()
,
asearchLocal()
,
asession()
,
atrace()
,
cache()
,
copyLocalRepo()
,
createLocalRepo()
,
createMDGallery()
,
deleteLocalRepo()
,
getRemoteHook()
,
getTagsLocal()
,
loadFromLocalRepo()
,
md5hash
,
removeTagsRepo()
,
restoreLibs()
,
rmFromLocalRepo()
,
saveToLocalRepo()
,
setLocalRepo()
,
shinySearchInLocalRepo()
,
showLocalRepo()
,
splitTagsLocal()
,
summaryLocalRepo()
,
zipLocalRepo()
if (FALSE) {
# objects preparation
showLocalRepo(method = "md5hashes",
repoDir = system.file("graphGallery", package = "archivist"))
showLocalRepo(method = "tags",
repoDir = system.file("graphGallery", package = "archivist"))
# Tag search, fixed version
searchInLocalRepo( "class:ggplot", repoDir = exampleRepoDir )
searchInLocalRepo( "name:", repoDir = exampleRepoDir )
# Tag search, regex version
searchInLocalRepo( "class", repoDir = exampleRepoDir, fixed = FALSE )
# Github version
# check the state of the Repository
summaryRemoteRepo( user="pbiecek", repo="archivist" )
showRemoteRepo( user="pbiecek", repo="archivist" )
showRemoteRepo( user="pbiecek", repo="archivist", method = "tags" )
# Tag search, fixed version
searchInRemoteRepo( "varname:Sepal.Width", user="pbiecek", repo="archivist" )
searchInRemoteRepo( "class:lm", user="pbiecek", repo="archivist", branch="master" )
searchInRemoteRepo( "name:myplot123", user="pbiecek", repo="archivist" )
# Tag search, regex version
searchInRemoteRepo( "class", user="pbiecek", repo="archivist", fixed = FALSE )
searchInRemoteRepo( "name", user="pbiecek", repo="archivist", fixed = FALSE )
# also on Github
# Remeber to set dateTo parameter to actual date because sometimes we update datasets.
searchInRemoteRepo( pattern = list( dateFrom = "2015-10-01", dateTo = "2015-11-30" ),
user="pbiecek", repo="archivist", branch="master" )
# many archivist-like Repositories on one Remote repository
searchInRemoteRepo( pattern = "name", user="MarcinKosinski", repo="Museum",
branch="master", subdir="ex1", fixed = FALSE )
searchInRemoteRepo( pattern = "name", user="MarcinKosinski", repo="Museum",
branch="master", subdir="ex2", fixed = FALSE )
# multi versions
searchInRemoteRepo( pattern=c("varname:Sepal.Width", "class:lm", "name:myplot123"),
user="pbiecek", repo="archivist", intersect = FALSE )
}
Run the code above in your browser using DataLab