# objects preparation
if (FALSE) {
# 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 <- tempfile()
createLocalRepo( repoDir = exampleRepoDir )
saveToLocalRepo( myplot123, repoDir=exampleRepoDir )
saveToLocalRepo( iris, repoDir=exampleRepoDir )
saveToLocalRepo( model, repoDir=exampleRepoDir )
zipLocalRepo( exampleRepoDir )
deleteLocalRepo( exampleRepoDir, TRUE)
rm( exampleRepoDir )
# Remote version
zipRemoteRepo( user="MarcinKosinski",
repo="Museum", branch="master", subdir="ex1" )
zipRemoteRepo( user="pbiecek", repo="archivist", repoTo = getwd( ) )
}
Run the code above in your browser using DataLab