Learn R Programming

archivist (version 2.3.8)

alink: Return a Link To Download an Artifact Stored on Remote Repository

Description

alink returns a link to download an artifact from the Remote Repository. Artifact has to be already archived on GitHub, e.g with archive function archivist.github package (recommended) or saveToRepo function and traditional Git manual synchronization. To learn more about artifacts visit archivistPackage.

Usage

alink(
  md5hash,
  repo = aoptions("repo"),
  user = aoptions("user"),
  subdir = aoptions("subdir"),
  branch = "master",
  repoType = aoptions("repoType"),
  format = "markdown",
  rawLink = FALSE
)

Value

This function returns a link to download artifact that is archived on GitHub.

Arguments

md5hash

A character assigned to the artifact through the use of a cryptographical hash function with MD5 algorithm. If it is specified in a format of 'repo/user/md5hash' then user and repo parameters are omitted.

repo

The Remote Repository on which the artifact that we want to download is stored.

user

The name of a user on whose Repository the the artifact that we want to download is stored.

subdir

A character containing a name of a directory on the Remote repository on which the Repository is stored. If the Repository is stored in the main folder on the Remote repository, this should be set to subdir = "/" as default.

branch

A character containing a name of the Remote Repository's branch on which the Repository is archived. Default branch is master.

repoType

A character containing a type of the remote repository. Currently it can be 'github' or 'bitbucket'.

format

In which format the link should be returned. Possibilities are markdown (default) or latex.

rawLink

A logical denoting whether to return raw link or a link in the format convention. Default value is FALSE.

Contact

Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues

Author

Marcin Kosinski, m.p.kosinski@gmail.com

Details

For more information about md5hash see md5hash.

See Also

Other archivist: Repository, Tags, %a%(), addHooksToPrint(), addTagsRepo(), aformat(), ahistory(), aoptions(), archivistPackage, aread(), areadLocal(), asearch(), asearchLocal(), asession(), atrace(), cache(), copyLocalRepo(), createLocalRepo(), createMDGallery(), deleteLocalRepo(), getRemoteHook(), getTagsLocal(), loadFromLocalRepo(), md5hash, removeTagsRepo(), restoreLibs(), rmFromLocalRepo(), saveToLocalRepo(), searchInLocalRepo(), setLocalRepo(), shinySearchInLocalRepo(), showLocalRepo(), splitTagsLocal(), summaryLocalRepo(), zipLocalRepo()

Examples

Run this code
if (FALSE) {
# link in markdown format
alink('pbiecek/archivist/134ecbbe2a8814d98f0c2758000c408e')
# link in markdown format with additional subdir
alink(user='BetaAndBit',repo='PieczaraPietraszki',
     md5hash = '1569cc44e8450439ac52c11ccac35138', 
     subdir = 'UniwersytetDzieci/arepo')
# link in latex format
alink(user = 'MarcinKosinski', repo = 'Museum',
      md5hash = '1651caa499a2b07a3bdad3896a2fc717', format = 'latex')
# link in raw format
alink('pbiecek/graphGallery/f5185c458bff721f0faa8e1332f01e0f', rawLink = TRUE)  
alink('pbiecek/graphgallerygit/02af4f99e440324b9e329faa293a9394', repoType='bitbucket')  
}

Run the code above in your browser using DataLab