knitcitations

:package: Generate citations for knitr markdown and html files

https://github.com/cboettig/knitcitations

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    2 of 13 committers (15.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.4%) to scientific vocabulary

Keywords from Contributors

reproducibility
Last synced: 6 months ago · JSON representation

Repository

:package: Generate citations for knitr markdown and html files

Basic Info
  • Host: GitHub
  • Owner: cboettig
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage: http://carlboettiger.info
  • Size: 705 KB
Statistics
  • Stars: 220
  • Watchers: 16
  • Forks: 28
  • Open Issues: 30
  • Releases: 0
Created almost 14 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog License Codemeta

README.md


title: An introduction to knitcitations author: Carl Boettiger date: 27 May 2014

bibliography: references.bib

Build Status Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows. CRAN_Status_Badge

knitcitations

knitcitations is an R package designed to add dynamic citations to dynamic documents created with Yihui's knitr package.

Installation

Install the development version directly from Github

r library(devtools) install_github("cboettig/knitcitations")

Or install the current release from your CRAN mirror with install.packages("knitcitations").

Quick start: rmarkdown (pandoc) mode

Start by loading the library. It is usually good to also clear the bibliographic environment after loading the library, in case any citations are already stored there:

r library("knitcitations") cleanbib()

Set pandoc as the default format:

r options("citation_format" = "pandoc")

(Note: The old method will eventually be deprecated. For documents using knitcitations <= 0.5 it will become necessary to set this as "compatibility").

Cite by DOI

Cite an article by DOI and the full citation information is gathered automatically. By default this now generates a citation in pandoc-flavored-markdown format. We use the inline command citep("10.1890/11-0011.1") to create this citation [@Abrams_2012].

An in-text citation is generated with citet, such as citet("10.1098/rspb.2013.1372") creating the citation to @Boettiger_2013.

Cite by URL

Not all the literature we may wish to cite includes DOIs, such as arXiv preprints, Wikipedia pages, or other academic blogs. Even when a DOI is present it is not always trivial to locate. With version 0.4-0, knitcitations can produce citations given any URL using the Greycite API. For instance, we can use the call citep("http://knowledgeblog.org/greycite") to generate the citation to the Greycite tool [@greycite2739].

Cite bibtex and bibentry objects directly

We can also use bibentry objects such as R provides for citing packages (using R's citation() function): citep(citation("knitr") produces [@Xie2014; @Xie2013; @Xie_2014a]. Note that this package includes citations to three objects, and pandoc correctly avoids duplicating the author names. In pandoc mode, we can still use traditional pandoc-markdown citations like @Boettiger2013 which will render as @Boettiger2013 without any R code, provided the citation is already in the .bib file we name (see below).

Re-using Keys

When the citation is called, a key in the format FirstAuthorsLastName_Year is automatically created for this citation, so we can now continue to cite this article without remembering the DOI, using the command citep("Abrams_2012") creates the citation [@Abrams_2012] without mistaking it for a new article.

Displaying the final bibliography

At the end of the document, include a chunk containing the command:

r write.bibtex(file="references.bib")

Use the chunk options echo=FALSE and message=FALSE to hide the chunk command and output.

This creates a Bibtex file with the name given. Pandoc can then be used to compile the markdown into HTML, MS Word, LaTeX, PDF, or many other formats, each with the desired journal styling. Pandoc is now integrated with RStudio through the rmarkdown package. Pandoc appends these references to the end of the markdown document automatically. In this example, we have added a yaml header to our Rmd file which indicates the name of the bib file being used, and the optional link to a CSL stylesheet which formats the output for the ESA journals:

```yaml

bibliography: "references.bib" csl: "ecology.csl" output:

html_document

```

Then calling rmarkdown::render("intro.Rmd") from R on the tutorial compiles the output markdown, with references in the format of the ESA journals.

References

Owner

  • Name: Carl Boettiger
  • Login: cboettig
  • Kind: user
  • Company: UC Berkeley

CodeMeta (codemeta.json)

{
  "@context": [
    "https://doi.org/doi:10.5063/schema/codemeta-2.0",
    "http://schema.org"
  ],
  "@type": "SoftwareSourceCode",
  "identifier": "knitcitations",
  "description": "Provides the ability to create dynamic citations\n    in which the bibliographic information is pulled from the web rather\n    than having to be entered into a local database such as 'bibtex' ahead of\n    time. The package is primarily aimed at authoring in the R 'markdown'\n    format, and can provide outputs for web-based authoring such as linked\n    text for inline citations.  Cite using a 'DOI', URL, or\n    'bibtex' file key.  See the package URL for details.",
  "name": "knitcitations: Citations for 'Knitr' Markdown Files",
  "codeRepository": "https://github.com/cboettig/knitcitations",
  "issueTracker": "https://github.com/cboettig/knitcitations/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "1.0.8",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "version": "3.4.0",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 3.4.0 (2017-04-21)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Central R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Carl",
      "familyName": "Boettiger",
      "email": "cboettig@gmail.com",
      "@id": "https://orcid.org/0000-0002-1642-628X"
    }
  ],
  "maintainer": {
    "@type": "Person",
    "givenName": "Carl",
    "familyName": "Boettiger",
    "email": "cboettig@gmail.com",
    "@id": "https://orcid.org/0000-0002-1642-628X"
  },
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "version": "1.6",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    }
  ],
  "softwareRequirements": [
    {
      "@type": "SoftwareApplication",
      "identifier": "RefManageR",
      "name": "RefManageR",
      "version": "0.8.2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "digest",
      "name": "digest",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "httr",
      "name": "httr",
      "version": "0.3",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "methods",
      "name": "methods"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "utils",
      "name": "utils"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": "3.0"
    }
  ],
  "keywords": [
    "citations",
    "'DOI'",
    "'knitr'"
  ],
  "contIntegration": "https://travis-ci.org/cboettig/knitcitations",
  "developmentStatus": "inactive",
  "releaseNotes": "https://github.com/cboettig/knitcitations/blob/master/NEWS.md",
  "readme": "https://github.com/cboettig/knitcitations/blob/master/README.md",
  "fileSize": "28.094KB"
}

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 202
  • Total Committers: 13
  • Avg Commits per committer: 15.538
  • Development Distribution Score (DDS): 0.129
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Carl Boettiger c****g@g****m 176
cboettig r****o@e****m 5
Sutton b****n@t****m 4
Keith Hughitt k****t@g****m 3
Kirill Müller k****r@i****h 3
suttonbm s****m@g****m 2
Bill Denney w****y@h****m 2
tyler rinker t****r@h****m 2
anobel a****l 1
Noam Ross n****s@g****m 1
Kirill Müller k****r 1
Kevin M. Smith K****h@t****u 1
Darío Hereñú m****a@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 84
  • Total pull requests: 17
  • Average time to close issues: 2 months
  • Average time to close pull requests: 6 months
  • Total issue authors: 44
  • Total pull request authors: 11
  • Average comments per issue: 2.79
  • Average comments per pull request: 0.82
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cboettig (26)
  • trinker (4)
  • zkamvar (3)
  • kdaily (3)
  • wolass (2)
  • lmmx (2)
  • lcolladotor (2)
  • HenrikBengtsson (2)
  • lfaller (2)
  • hadley (2)
  • dmenne (2)
  • jjchern (1)
  • Pakillo (1)
  • dr-harper (1)
  • johnstantongeddes (1)
Pull Request Authors
  • krlmlr (5)
  • khughitt (2)
  • trinker (2)
  • ruxi (2)
  • suttonbm (2)
  • nsunami (1)
  • noamross (1)
  • kant (1)
  • Kevin-M-Smith (1)
  • billdenney (1)
  • anobel (1)
Top Labels
Issue Labels
enhancement (11) bug (9) documentation (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 1,920 last-month
  • Total docker downloads: 132,799
  • Total dependent packages: 23
    (may contain duplicates)
  • Total dependent repositories: 73
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 1
cran.r-project.org: knitcitations

Citations for 'Knitr' Markdown Files

  • Versions: 20
  • Dependent Packages: 23
  • Dependent Repositories: 72
  • Downloads: 1,920 Last month
  • Docker Downloads: 132,799
Rankings
Stargazers count: 1.9%
Forks count: 2.5%
Dependent repos count: 2.8%
Dependent packages count: 3.1%
Average: 8.0%
Downloads: 12.7%
Docker downloads count: 24.9%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-knitcitations
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.3%
Stargazers count: 25.5%
Forks count: 30.7%
Average: 33.0%
Dependent packages count: 51.6%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0 depends
  • RefManageR >= 0.8.2 imports
  • digest * imports
  • httr >= 0.3 imports
  • methods * imports
  • utils * imports
  • knitr >= 1.6 suggests
  • rmarkdown * suggests
  • testthat * suggests