if (FALSE) {
## Local version
exampleRepoDir <- tempfile()
createLocalRepo(repoDir = exampleRepoDir)
setLocalRepo(exampleRepoDir)
data(iris)
data(swiss)
# From this moment repoDir parameter may be ommitted in the following functions
saveToRepo(iris)
saveToRepo(swiss)
showLocalRepo()
showLocalRepo(method = "tags")
iris2 <- loadFromLocalRepo( "ff575c2" , value = TRUE)
searchInLocalRepo("name:i", fixed = FALSE)
getTagsLocal("ff575c261c949d073b2895b05d1097c3")
rmFromLocalRepo("4c43f")
showLocalRepo()
summaryLocalRepo()
# REMEMBER that in deleteLocalRepo you MUST specify repoDir parameter!
# deleteRepo doesn't take setLocalRepo's settings into consideration
deleteLocalRepo( exampleRepoDir, deleteRoot=TRUE)
rm( exampleRepoDir )
## Github version
setRemoteRepo( user="MarcinKosinski", repo="Museum", branch="master",
subdir="ex1" )
# From this moment user, repo, branch, subdir parameters may be ommitted
# in the following functions:
showRemoteRepo()
loadFromRemoteRepo( "ff575c261c949d073b2895b05d1097c3")
this <- loadFromRemoteRepo( "ff", value = TRUE)
zipRemoteRepo()
file.remove(file.path(getwd(), "repository.zip")) # We can remove this zip file
searchInRemoteRepo( "name:", fixed= FALSE)
getTagsRemote("ff575c261c949d073b2895b05d1097c3")
summaryRemoteRepo( )
# To use multisearchInRemoteRepo we should use repository with more than one artifact.
setRemoteRepo( user="pbiecek", repo="archivist" )
# From this moment user and repo parameters may be ommitted in the following functions
showRemoteRepo()
searchInRemoteRepo( pattern=c("varname:Sepal.Width", "class:lm", "name:myplot123"),
intersect = FALSE )
}
Run the code above in your browser using DataLab