Learn R Programming

archivist (version 2.3.8)

splitTagsLocal: Split Tags in Repository

Description

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

Usage

splitTagsLocal(repoDir = aoptions("repoDir"))

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

Value

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

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'.

Contact

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

Author

Witold Chodor , witoldchodor@gmail.com

Details

tag column from tag table has normally the following 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.

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(), archivistPackage, aread(), areadLocal(), asearch(), asearchLocal(), asession(), atrace(), cache(), copyLocalRepo(), createLocalRepo(), createMDGallery(), deleteLocalRepo(), getRemoteHook(), getTagsLocal(), loadFromLocalRepo(), md5hash, removeTagsRepo(), restoreLibs(), rmFromLocalRepo(), saveToLocalRepo(), searchInLocalRepo(), setLocalRepo(), shinySearchInLocalRepo(), showLocalRepo(), summaryLocalRepo(), zipLocalRepo()

Examples

Run this code
if (FALSE) {
## 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"))
}

Run the code above in your browser using DataLab