addHooksToPrintGitHub {archivist.github} | R Documentation |
Add archivist Hooks to rmarkdown markdown/LaTeX Reports and Archive Artifact on GitHub
Description
addHooksToPrintGitHub
adds an overloaded version of the print function for objects of selected class.
The overloaded function will add all objects of selected class to the Repository and then will add hooks to the HTML report (generated in rmarkdown) for these objects (artifacts
- archivist-package).
This is GitHub version of addHooksToPrint
and it automatically stores artifacts on GitHub - see examples.
This function is well explained on this http://r-bloggers.com/r-hero-saves-backup-city-with-archivist-and-github blog post.
Usage
addHooksToPrintGitHub(class = "ggplot", repo = aoptions("repo"),
user = aoptions("user"), password = aoptions("password"),
format = "markdown")
Arguments
class |
A character containing a name of class (one or more) that should be archived. |
repo |
A character containing a name of a GitHub repository on which the Repository is archived.
If |
user |
A character containing a name of a GitHub user on whose account the |
password |
A character denoting GitHub user password. Can be set globally with |
format |
The same as in alink. |
Note
One can specify userTags
as in archive for artifacts by adding "tags"
attribute.
See note secion about that in archive.
Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues
Author(s)
Przemyslaw Biecek (addHooksToPrint), przemyslaw.biecek@gmail.com
Marcin Kosinski (addHooksToPrintGitHub), m.p.kosinski@gmail.com
References
More about archivist.github can be found on marcinkosinski.github.io/archivist.github/ and about archivist in posts' history on https://pbiecek.github.io/archivist/articles/posts.html
See Also
Other archivist: archivist-github-integration
Examples
## Not run:
# only in Rmd report, links to GitHub repository and archive artifact
#' # empty GitHub Repository creation
authoriseGitHub(ClientID, ClientSecret) -> github_token
# authoriseGitHub also does: aoptions("github_token", github_token)
aoptions("user", user.name)
aoptions("password", user.password)
createGitHubRepo("Museum", default = TRUE) # it does aoptions("repo", "Museum")
addHooksToPrintGitHub(class="ggplot") # takes default parameters from ?aoptions
qplot(mpg, wt, data = mtcars, geom = "path")
summaryRemoteRepo()
showRemoteRepo()
## End(Not run)