View source: R/createEmptyRepo.R
| createLocalRepo | R Documentation |
createLocalRepo creates an empty Repository in the given directory in which archived artifacts will be stored.
createLocalRepo(repoDir, force = FALSE, default = FALSE)
createPostgresRepo(repoDir, connector, force = FALSE, default = FALSE)
createEmptyRepo(...)
repoDir |
A character that specifies the directory for the Repository which is to be made. |
force |
If |
default |
If |
connector |
If user want to use some external database instead of SQLite, then the |
... |
All arguments are being passed to |
At least one Repository must be initialized before using other functions from the archivist package. While working in groups, it is highly recommended to create a Repository on a shared Dropbox/GitHub folder.
All artifacts which are desired to be archived are going to be saved in the local Repository, which is an SQLite
database stored in a file named backpack.
After calling saveToRepo function, each artifact will be archived in a md5hash.rda file.
This file will be saved in a folder (under repoDir directory) named
gallery. For every artifact, md5hash is a unique string of length 32 that is produced by
digest function, which uses a cryptographical MD5 hash algorithm.
To learn more about artifacts visit archivistPackage.
Created backpack database is a useful and fundamental tool for remembering artifact's
name, class, archiving date etc. (the so called Tags)
or for keeping artifact's md5hash.
Besides the backpack database, gallery folder is created in which all
artifacts will be archived.
After every saveToRepo call the database is refreshed. As a result, the artifact is available
immediately in backpack.db database for other collaborators.
Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues
Marcin Kosinski, m.p.kosinski@gmail.com Przemyslaw Biecek, przemyslaw.biecek@gmail.com
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
Other archivist:
Repository,
Tags,
%a%(),
addHooksToPrint(),
addTagsRepo(),
aformat(),
ahistory(),
alink(),
aoptions(),
archivistPackage,
aread(),
areadLocal(),
asearch(),
asearchLocal(),
asession(),
atrace(),
cache(),
copyLocalRepo(),
createMDGallery(),
deleteLocalRepo(),
getRemoteHook(),
getTagsLocal(),
loadFromLocalRepo(),
md5hash,
removeTagsRepo(),
restoreLibs(),
rmFromLocalRepo(),
saveToLocalRepo(),
searchInLocalRepo(),
setLocalRepo(),
shinySearchInLocalRepo(),
showLocalRepo(),
splitTagsLocal(),
summaryLocalRepo(),
zipLocalRepo()
Other archivist:
Repository,
Tags,
%a%(),
addHooksToPrint(),
addTagsRepo(),
aformat(),
ahistory(),
alink(),
aoptions(),
archivistPackage,
aread(),
areadLocal(),
asearch(),
asearchLocal(),
asession(),
atrace(),
cache(),
copyLocalRepo(),
createMDGallery(),
deleteLocalRepo(),
getRemoteHook(),
getTagsLocal(),
loadFromLocalRepo(),
md5hash,
removeTagsRepo(),
restoreLibs(),
rmFromLocalRepo(),
saveToLocalRepo(),
searchInLocalRepo(),
setLocalRepo(),
shinySearchInLocalRepo(),
showLocalRepo(),
splitTagsLocal(),
summaryLocalRepo(),
zipLocalRepo()
Other archivist:
Repository,
Tags,
%a%(),
addHooksToPrint(),
addTagsRepo(),
aformat(),
ahistory(),
alink(),
aoptions(),
archivistPackage,
aread(),
areadLocal(),
asearch(),
asearchLocal(),
asession(),
atrace(),
cache(),
copyLocalRepo(),
createMDGallery(),
deleteLocalRepo(),
getRemoteHook(),
getTagsLocal(),
loadFromLocalRepo(),
md5hash,
removeTagsRepo(),
restoreLibs(),
rmFromLocalRepo(),
saveToLocalRepo(),
searchInLocalRepo(),
setLocalRepo(),
shinySearchInLocalRepo(),
showLocalRepo(),
splitTagsLocal(),
summaryLocalRepo(),
zipLocalRepo()
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.