CRediTas

credit is a tiny package to generate CRediT author statements (https://credit.niso.org/). It provides three functions: create a template, read it back and generate the CRediT author statement in a text file.

https://github.com/ropensci/creditas

Science Score: 36.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
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.1%) to scientific vocabulary

Keywords

r r-package rstats
Last synced: 9 months ago · JSON representation

Repository

credit is a tiny package to generate CRediT author statements (https://credit.niso.org/). It provides three functions: create a template, read it back and generate the CRediT author statement in a text file.

Basic Info
Statistics
  • Stars: 9
  • Watchers: 4
  • Forks: 3
  • Open Issues: 1
  • Releases: 3
Topics
r r-package rstats
Created over 3 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Codemeta

README.Rmd

---
output: github_document
---



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

# CRediTas


[![R-CMD-check](https://github.com/ropensci/CRediTas/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ropensci/CRediTas/actions/workflows/R-CMD-check.yaml)
[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/576_status.svg)](https://github.com/ropensci/software-review/issues/576)
[![DOI](https://zenodo.org/badge/605528165.svg)](https://zenodo.org/badge/latestdoi/605528165)
[![Total CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/CRediTas?color=blue)](https://cranlogs.r-pkg.org/#badges)


The goal of CRediTas is to facilitate the tedious job of creating [CRediT authors statements](https://credit.niso.org/) for scientific publications. Normally, the first author of a scientific paper organizes a table in a spreadsheet where all the authors self-state their contributions. Often too, it is the first author responsibility to state the contributions of all co-authors. However, at the end, the information has to be translated to the CRediT statement format of "Author 1: roles Authors 2: roles ..." which is prone to errors and tedious, especially if there are many co-authors. The CRediTas package aims to make this easier by providing a template to be filled in form of a table (csv) and then converting this table to CRediT statement format.  

## Installation

You can install the development version of CRediTas from [r-universe](https://r-universe.dev/) with:

``` r
install.packages("CRediTas", repos = "https://ropensci.r-universe.dev")
```

Or you can install de long term release version from [CRAN](https://CRAN.R-project.org/package=CRediTas) as usual:

``` r
install.packages("CRediTas")
```

## Example

The workflow is meant to work with three basic functions. First, we create a template table. It can be created as a `data.frame` and being populated in R. Or as a csv file and being populated in your preferred csv editor.

```{r create_template}
library(CRediTas)

template_create(authors = c("Alexander Humboldt", "Carl Ritter"), file = tempfile())

cras_table <- template_create(authors = c("Friedrich Ratzel", 
                                          "Pau Vidal de la Blache", 
                                          "Pau Vila",
                                          "Élisée Reclus"))
knitr::kable(cras_table)

```
As you can see, the table is empty. So you must provide the information of who did what. You can use the `fix` function to fill the template directly in R:

```{r fix, eval=FALSE}

fix(cras_table)

```

If you wrote the template to a file, then you can read it back to R as follows:

```{r template_read, eval=FALSE}

cras_table <- template_read(path_to_your_csv_file)

```
Once the `cras_table` is populated, for instance:

```{r populate_random, echo=FALSE}

cras_table[-3, -1] <- sample(0:1, size=3*14, replace = TRUE, prob = c(0.6, 0.4))
knitr::kable(cras_table)

```
A text file can be generated following the CRediT author statement format. Since `drop = TRUE` by default, the authors without contribution are removed from the statement, Pau Vila in this case.

```{r}

textfile <- tempfile()

cras_write(cras_table, textfile, markdown = TRUE, quiet = TRUE)

```

If you open the text file, you will find this:

`r cras_write(cras_table, markdown = TRUE, quiet = TRUE)`


## Related packages

- [tenzing](https://github.com/marton-balazs-kovacs/tenzing/): Tenzing, an easy-to-use web-based app, allows researchers to generate reports about the contribution of each team member on a project using CRediT, for insertion into their manuscripts and for publishers to potentially incorporate into article metadata.
- [contribution](https://github.com/openbiox/contribution): The goal of contribution is to generate contribution table for credit assignment in a project. This is inspired by Nick Steinmetz (see twitter https://twitter.com/SteinmetzNeuro/status/1147241138291527681).

## Citation

```{r}

citation("CRediTas")

```

Owner

  • Name: rOpenSci
  • Login: ropensci
  • Kind: organization
  • Email: info@ropensci.org
  • Location: Berkeley, CA

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "CRediTas",
  "description": "CRediTas is a tiny package to generate CRediT author statements (<https://credit.niso.org/>). It provides three functions: create a template, read it back and generate the CRediT author statement in a text file.",
  "name": "CRediTas: Generate CRediT Author Statements",
  "relatedLink": "https://docs.ropensci.org/CRediTas",
  "codeRepository": "https://github.com/ropensci/CRediTas",
  "issueTracker": "https://github.com/ropensci/CRediTas/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.2.0",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.2.2 (2022-10-31 ucrt)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Josep",
      "familyName": "Pueyo-Ros",
      "email": "josep.pueyo@udg.edu",
      "@id": "https://orcid.org/0000-0002-1236-5651"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Josep",
      "familyName": "Pueyo-Ros",
      "email": "josep.pueyo@udg.edu",
      "@id": "https://orcid.org/0000-0002-1236-5651"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rvest",
      "name": "rvest",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rvest"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    }
  ],
  "softwareRequirements": {
    "SystemRequirements": null
  },
  "fileSize": "30.478KB",
  "releaseNotes": "https://github.com/ropensci/CRediTas/blob/master/NEWS.md",
  "readme": "https://github.com/ropensci/CRediTas/blob/master/README.md",
  "contIntegration": "https://github.com/ropensci/CRediTas/actions/workflows/R-CMD-check.yaml",
  "review": {
    "@type": "Review",
    "url": "https://github.com/ropensci/software-review/issues/576",
    "provider": "https://ropensci.org"
  },
  "keywords": [
    "r",
    "r-package",
    "rstats"
  ]
}

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 3
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 2
  • Pull request event: 2
  • Fork event: 1
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 3
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 2
  • Pull request event: 2
  • Fork event: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 16
  • Total pull requests: 0
  • Average time to close issues: about 9 hours
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • 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
  • jospueyo (17)
  • wikisqueaks (1)
Pull Request Authors
  • wikisqueaks (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 670 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: CRediTas

Generate CRediT Author Statements

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 670 Last month
Rankings
Dependent packages count: 29.7%
Dependent repos count: 35.3%
Average: 51.6%
Downloads: 89.7%
Maintainers (1)
Last synced: 10 months ago