ahistory extracts artifact's history and creates a data frame with
history of calls and md5hashes of partial results. The overloaded
print.ahistory function prints this history in a concise way. The overloaded
print.ahistoryKable function prints this history in the same way as kable.
alink=TRUE one can create history table/kable with hooks to partial results (artifacts) as in the alink function.
1 2 3
An artifact which history is supposed to be reconstructed. It will be converted into md5hash.
A character denoting an existing directory in which an artifact will be saved.
A character denoting whether to print history in either a
Whether to provide hooks to objects like in alink. See examples.
Further parameters passed to alink function. Used when
All artifacts created with %a% operator are archivised with
detailed information about it's source (both call and md5hash of the input).
ahistory reads all artifacts that
artifact and create a description of the input flow.
print.ahistory function plots the history in a human readable way.
A data frame with two columns - names of calls and md5hashes of partial results.
Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues
This function is well explained on this http://r-bloggers.com/r-hero-saves-backup-city-with-archivist-and-github blog post.
There are provided functions (
print.ahistoryKable) to print the artifact's history.
History can be printed either in a
regular way which is friendy for the console output or in a
kable format which
prints the artifact's history in a way kable function would. This is convenient when one prints history
.Rmd files using rmarkdown.
Moreover when user passes
format = 'kable' and
alink = TRUE then one can use links for remote Repository.
Then mdhashes are taken from Local Repository, so user has to specify
repoDir even though
they are set globally, because
repo is a substring of
repoDir and during evalutation of
... R treats
Przemyslaw Biecek, email@example.com
Marcin Kosinski, firstname.lastname@example.org
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
createLocalRepo("ahistory_check", default = TRUE) library(dplyr) iris %a% filter(Sepal.Length < 6) %a% lm(Petal.Length~Species, data=.) %a% summary() -> artifact ahistory(artifact) ahistory(artifact, format = "kable") print(ahistory(artifact, format = "kable"), format = "latex") ahistory(artifact, format = "kable", alink = TRUE, repoDir = "ahistory_check", repo = "repo", user = "user") repoDir <- file.path(getwd(), "ahistory_check") deleteLocalRepo(repoDir, deleteRoot = TRUE) aoptions('repoDir', NULL, unset = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.