splitTags: Split Tags in Repository

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

View source: R/splitTags.R

Description

splitTagsLocal and splitTagsRemote functions split tag column from tag table placed in backpack.db into two separate columns: tagKey and tagValue.

Usage

1
2
3
4
5
6
7
8
9
splitTagsLocal(repoDir = aoptions("repoDir"))

splitTagsRemote(
  repo = aoptions("repo"),
  user = aoptions("user"),
  branch = aoptions("branch"),
  subdir = aoptions("subdir"),
  repoType = aoptions("repoType")
)

Arguments

repoDir

While working with the local repository. A character denoting an existing directory of the Repository.

repo

While working with the Github repository. A character containing a name of the Github repository on which the Repository is stored. By default set to NULL - see Note.

user

While working with the Github repository. A character containing a name of the Github user on whose account the repo is created. By default set to NULL - see Note.

branch

While working with the Github repository. A character containing a name of the Github Repository's branch on which the Repository is stored. Default branch is master.

subdir

While working with the Github repository. A character containing a name of a directory on the Github repository on which the Repository is stored. If the Repository is stored in the main folder of the Github repository, this should be set to subdir = "/" as default.

repoType

A character containing a type of the remote repository. Currently it can be 'github' or 'bitbucket'.

Details

tag column from tag table has normally the follwing structure: TagKey:TagValue. splitTagsLocal and splitTagsRemote functions can be used to split tag column into two separate columns: tagKey and tagValue. As a result functions from dplyr package can be used to easily summarize, search, and extract artifacts' Tags. See examples.

Value

A data.frame with 4 columns: artifact, tagKey, tagValue and createdDate, corresponding to the current state of Repository.

Contact

Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues

Note

If repo and user are set to NULL (as default) in the Github mode then global parameters set in setRemoteRepo function are used.

Sometimes we can use addTags* function or userTags parameter in saveToRepo to specify a Tag which might not match TagKey:TagValue structure. It is simply Tag. In this case tagKey = userTags and tagValue = Tag. See examples.

To learn more about Tags and Repository structure check Tags and Repository.

Author(s)

Witold Chodor , witoldchodor@gmail.com

References

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

See Also

Other archivist: Repository, Tags, %a%(), addHooksToPrint(), addTagsRepo(), aformat(), ahistory(), alink(), aoptions(), archivist-package, areadLocal(), aread(), asearchLocal(), asearch(), asession(), atrace(), cache(), copyLocalRepo(), createLocalRepo(), createMDGallery(), deleteLocalRepo(), getRemoteHook(), getTagsLocal(), loadFromLocalRepo(), md5hash, removeTagsRepo(), restoreLibs(), rmFromLocalRepo(), saveToLocalRepo(), searchInLocalRepo(), setLocalRepo(), shinySearchInLocalRepo(), showLocalRepo(), summaryLocalRepo(), zipLocalRepo()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
## LOCAL VERSION 

setLocalRepo(system.file("graphGallery", package = "archivist"))
head(showLocalRepo(method = "tags"))
head(splitTagsLocal() )

## Github Version
# Let's check how does table tag look like while we are using the
# Gitub repository.
# We will choose only special columns of data frames that show Tags
head(showRemoteRepo( user = "pbiecek", repo = "archivist", method = "tags" )[,2])
head(splitTagsRemote( user = "pbiecek", repo = "archivist" )[,2:3])

head(splitTagsRemote("PieczaraPietraszki", "BetaAndBit", "master", "UniwersytetDzieci/arepo"))

## End(Not run)

pbiecek/archivist documentation built on May 25, 2021, 11:36 p.m.