archivist (version 1.1)

tarLocalRepo: Create a Tar Archive From an Existing Repository

Description

tarLocalRepo and tarGithubRepo create a tar archive from an existing Repository.

Usage

tarLocalRepo(repoDir)

tarGithubRepo(repoTo, user, repo, branch = "master", repoDirGit = FALSE)

Arguments

repoDir
A character that specifies the directory of the Repository which will be tarred.
repo
Only if working with a Github repository. A character containing a name of a Github repository on which the Repository to be tarred is archived.
user
Only if working with a Github repository. A character containing a name of a Github user on whose account the repo is created.
branch
Only if working with a Github repository. A character containing a name of Github repository's branch in which Repository to be tarred is archived. Default branch is master.
repoDirGit
Only if working with a Github repository. A character containing a name of a directory on Github repository on which the Repository to be tarred is stored. If the Repository is stored in main folder on Github repository, this should be set to
repoTo
Only if working with a Github repository. A characterthat specifies the directory in which will be created tar archive from Repository stored on Github.

Details

tarLocalRepo and tarGithubRepo create a tar archive from an existing Repository. tarLocalRepo tars local Repository, tarGithubRepo tars Repository stored on Github.

See Also

Other archivist: Repository; Tags; archivist-package; copyGithubRepo, copyLocalRepo; createEmptyRepo; deleteRepo; getTagsGithub, getTagsLocal; loadFromGithubRepo, loadFromLocalRepo; md5hash; rmFromRepo; saveToRepo; searchInGithubRepo, searchInLocalRepo; showGithubRepo, showLocalRepo; summaryGithubRepo, summaryLocalRepo

Other archivist: Repository; Tags; archivist-package; copyGithubRepo, copyLocalRepo; createEmptyRepo; deleteRepo; getTagsGithub, getTagsLocal; loadFromGithubRepo, loadFromLocalRepo; md5hash; rmFromRepo; saveToRepo; searchInGithubRepo, searchInLocalRepo; showGithubRepo, showLocalRepo; summaryGithubRepo, summaryLocalRepo

Examples

Run this code
# objects preparation
# data.frame object
data(iris)

# ggplot/gg object
library(ggplot2)
df <- data.frame(gp = factor(rep(letters[1:3], each = 10)),y = rnorm(30))
library(plyr)
ds <- ddply(df, .(gp), summarise, mean = mean(y), sd = sd(y))
myplot123 <- ggplot(df, aes(x = gp, y = y)) +
  geom_point() +  geom_point(data = ds, aes(y = mean),
               colour = 'red', size = 3)

# lm object
model <- lm(Sepal.Length~ Sepal.Width + Petal.Length + Petal.Width, data= iris)

# Local version

exampleRepoDir <- tempdir()
createEmptyRepo( repoDir = exampleRepoDir )
saveToRepo( myplot123, repoDir=exampleRepoDir )
saveToRepo( iris, repoDir=exampleRepoDir )
saveToRepo( model, repoDir=exampleRepoDir )

tarLocalRepo( exampleRepoDir )

deleteRepo( exampleRepoDir )

rm( exampleRepoDir )

# Github version

tarGithubRepo( user="MarcinKosinski",
repo="Museum", branch="master", repoDirGit="ex1" )

tarGithubRepo( user="pbiecek, repo="archivist, repoTo = getwd( ) )

Run the code above in your browser using DataLab