https://github.com/crsh/rmdfiltr

R package that provides a collection of Lua filters that extend the functionality of R Markdown templates.

https://github.com/crsh/rmdfiltr

Science Score: 23.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
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

R package that provides a collection of Lua filters that extend the functionality of R Markdown templates.

Basic Info
  • Host: GitHub
  • Owner: crsh
  • License: other
  • Language: Lua
  • Default Branch: master
  • Homepage:
  • Size: 83 KB
Statistics
  • Stars: 42
  • Watchers: 6
  • Forks: 3
  • Open Issues: 6
  • Releases: 2
Created about 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# rmdfiltr


  [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
  [![Travis build status](https://travis-ci.org/crsh/rmdfiltr.svg?branch=master)](https://travis-ci.org/crsh/rmdfiltr)
  [![CRAN status](https://www.r-pkg.org/badges/version/rmdfiltr)](https://cran.r-project.org/package=rmdfiltr)
  ![CRAN downloads](https://cranlogs.r-pkg.org/badges/last-month/rmdfiltr)
 

**rmdfiltr** provides a collection of [Lua-filters](https://pandoc.org/lua-filters.html) that extend the functionality
  of R Markdown templates.

## Installation



You can install the development version from this GitHub repository with:

``` r
# install.packages("remotes")
remotes::install_github("crsh/rmdfiltr")
```


## Example

You can add a filter to any R Markdown template that accepts additional `pandoc` arguments.

``` yaml
---
title: "Word count test"
output:
  html_document:
    pandoc_args: !expr rmdfiltr::add_wordcount_filter()
---
```

Of course, you can also use the filters in a custom R Markdown format by adding `pandoc` arguments with the pre-processor function.

``` r
wordcount_html_document = function(...) {
  format <- rmarkdown::html_document(...)
  format$pre_processor <- rmdfiltr::add_wordcount_filter
  format
}
```

See [R Markdown: The Definitive Guide](https://bookdown.org/yihui/rmarkdown/new-formats.html) for details on how to create custom formats.

## Filters

**rmdfiltr** currently provides the following filters:

- `wordcount`: Prints the word count for the body of the document and for the reference section to the console.
- `charcount`: Prints the character count for the body of the document to the console.
- `replace_ampersands`: Replaces all ampersands in in-text citation with `and` (or the equivalent in other languages).
- [`doi2cite`](https://github.com/korintje/pandoc-doi2cite/blob/main/doi2cite.lua): Generates `.bib` file from the DOIs in a document and convert the DOIs into BibTeX citation keys.


# Contributions

Contributions of new filters are welcome.
Pleas refer to the [contributing guidelines](https://github.com/crsh/rmdfiltr/blob/master/.github/CONTRIBUTING.md) before you start working or open a pull request.
Also, please note that the **rmdfiltr** project is released with a
[Contributor Code of Conduct](https://github.com/crsh/rmdfiltr/blob/master/.github/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.

Owner

  • Name: Frederik Aust
  • Login: crsh
  • Kind: user
  • Location: Cologne, Germany
  • Company: Psychological Methods, University of Amsterdam

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 1
  • Issue comment event: 2
  • Push event: 1
  • Fork event: 1
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 1
  • Issue comment event: 2
  • Push event: 1
  • Fork event: 1

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 37
  • Total Committers: 3
  • Avg Commits per committer: 12.333
  • Development Distribution Score (DDS): 0.108
Past Year
  • Commits: 11
  • Committers: 2
  • Avg Commits per committer: 5.5
  • Development Distribution Score (DDS): 0.091
Top Committers
Name Email Commits
Frederik Aust f****t@u****e 33
mariusbarth m****h@u****e 3
Rabalder9 7****9 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 13
  • Total pull requests: 4
  • Average time to close issues: 4 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 9
  • Total pull request authors: 3
  • Average comments per issue: 1.77
  • Average comments per pull request: 0.75
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 17 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mariusbarth (4)
  • crsh (2)
  • andrewheiss (1)
  • jooyoungseo (1)
  • sammo3182 (1)
  • shirdekel (1)
  • Kalif-Vaughn (1)
  • jrennstich (1)
  • njbart (1)
Pull Request Authors
  • mariusbarth (3)
  • Rabalder9 (2)
  • crsh (1)
Top Labels
Issue Labels
enhancement (3) bug (2) help wanted (1) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 2,236 last-month
  • Total docker downloads: 136
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: rmdfiltr

'Lua'-Filters for R Markdown

  • Versions: 6
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 2,236 Last month
  • Docker Downloads: 136
Rankings
Stargazers count: 7.4%
Downloads: 10.9%
Average: 16.9%
Dependent packages count: 18.1%
Docker downloads count: 19.8%
Forks count: 21.0%
Dependent repos count: 23.9%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • assertthat >= 0.2.1 imports
  • rmarkdown >= 1.12 imports
  • utils * imports
  • dplyr >= 0.8.0.1 suggests
  • ggplot2 >= 3.0.0 suggests
  • knitr >= 1.22 suggests
  • spelling >= 2.1 suggests
  • testthat >= 2.0.0 suggests
  • tibble >= 2.1.1 suggests