Learn R Programming

archivist (version 2.0.2)

addHooksToPrint: Add Archivist Hooks to Report

Description

addHooksToPrint adds an overloaded version of the print function for objects of selected class. The overloaded function will add all object of selected class to the repo and then add hooks to the report for these objects .

Usage

addHooksToPrint(class = "ggplot", repoDir = aoptions("repoDir"),
  repo = aoptions("repo"), user = aoptions("user"), branch = "master",
  subdir = aoptions("subdir"))

Arguments

class
A character containing a name of class (one or more) that should be archivised.
repoDir
A character containing a name of Local Repository.
repo
A character containing a name of a Git repository on which the Repository is archived. If repo = NULL then hooks will be added to files in local directories.
user
A character containing a name of a Git user on whose account the repo is created.
branch
A character containing a name of Git Repository's branch on which the Repository is archived. Default branch is master.
subdir
A character containing a name of a directory on Git repository on which the Repository is stored. If the Repository is stored in main folder on Git repository, this should be set to subdir = "/" as default.

See Also

Other archivist: Repository, Tags, %a%, addTagsRepo, aformat, ahistory, alink, aoptions, archivist-package, aread, asearch, asession, cache, copyLocalRepo, createLocalRepo, createMDGallery, deleteLocalRepo, getRemoteHook, getTagsLocal, loadFromLocalRepo, md5hash, restoreLibs, rmFromLocalRepo, saveToLocalRepo, searchInLocalRepo, setLocalRepo, shinySearchInLocalRepo, showLocalRepo, splitTagsLocal, summaryLocalRepo, zipLocalRepo

Examples

Run this code
# only in Rmd report, links to github repository
addHooksToPrint(class="ggplot", repoDir = "arepo",
repo="graphGallery", user="pbiecek")
# only in Rmd report, links to local files
addHooksToPrint(class="ggplot", repoDir = "arepo",
repo=NULL)

Run the code above in your browser using DataLab