if (FALSE) {
exampleRepoDir <- tempfile()
createLocalRepo( repoDir = exampleRepoDir, default = TRUE )
data(iris)
saveToLocalRepo(iris)
showLocalRepo()
showLocalRepo(method = "tags")
deleteLocalRepo( repoDir = exampleRepoDir, unset = TRUE, deleteRoot = TRUE)
# example with external database
# create a connector
require("RPostgreSQL")
drv <- dbDriver("PostgreSQL")
connector <- function() {
dbConnect(drv, dbname = "postgres",
host = "localhost", port = 5432,
user = "user", password = pw)
}
# Now you can create an empty repository with postgress database
exampleRepoDir <- tempfile()
createPostgresRepo( repoDir = exampleRepoDir, connector)
data(iris)
saveToLocalRepo(iris)
showLocalRepo()
showLocalRepo(method = "tags")
deleteLocalRepo( repoDir = exampleRepoDir, unset = TRUE, deleteRoot = TRUE)
}
Run the code above in your browser using DataLab