MyNixOS website logo
Description

A Tiny Contribution Table Generator Based on 'ggplot2'.

Contribution table for credit assignment based on 'ggplot2'. This can improve the author contribution information in academic journals and personal CV.

contribution - A Tiny Contribution Table Generator Based on ggplot2

AppVeyor buildstatus Travis buildstatus Lifecycle:stable CRANstatus

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).

Authors contributions sections are new and still don’t appear in major journals, but can be improved. Rather than text listing each author’s contributions, the same data can be presented as a table with rows corresponding to contributions and columns for each author.

Advantages include:

  1. Graphics are faster and easier to comprehend. They are also easier to locate in the document.

  2. This format can be readily augmented with additional information, such as distinguishing between ‘major’ and ‘minor’ contributions of each type.

  3. This format can be read as easily in either direction, answering both “Who did X?” and “What did person Y do?” equally.

  4. This format lends itself to a nice extension for including your author contribution information on your CV: a similar table where each column is one of your papers.

A difficulty with this is the diversity of terminology used, which would be helped by refinement and more widespread adoption of the CRediT framework (https://casrai.org/credit/).

Feature

  • Support table type
    • 3-level contribution (i.e. ‘None’, ‘Minor’ and ‘Major’)
    • numeric contribution
  • Dataset palette contains 27 color maps

An R Shiny application can be found at https://shiny.hiplot.com.cn/contribution-table/. Corresponding source code is available at https://github.com/ShixiangWang/shinyapps/tree/main/contribution-table.

Installation

You can install the released version of contribution from CRAN with:

install.packages("contribution")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("openbiox/contribution")

Basic example

This is a basic example which shows you how to plot a simple contribution table:

library(contribution)
data("demo")
demo
#> # A tibble: 5 × 4
#>   Class              WWP   NAS   TM   
#>   <chr>              <chr> <chr> <chr>
#> 1 Designed research  <NA>  Major Major
#> 2 Performed research <NA>  Major <NA> 
#> 3 Developed tool     Major Minor <NA> 
#> 4 Analyzed data      Major Minor Minor
#> 5 Wrote the paper    Major Minor Major

The accepted data format is a data.frame whose first column show the role and the other columns show the people or projects. This format is easy to create using R or other tools like Excel.

For a 3-level contribution table, only Minor and Major are valid, a NA value should put in cell for no contribution.

generate(demo)

The white box represents no contribution, the grey box represents minor contribution, and the black box represents major contribution.

The table is nice, easy to read. The result is a ggplot object, so you can modify in your way!

You can also use other colors and scale_fill_* function from ggplot2 to map colors:

library(ggplot2)
generate(demo, text_angle_x = 20, color_map = scale_fill_brewer(palette ="Oranges"))

When it is not easy to see the meaning of color, you can show the legend.

generate(demo, text_angle_x = 20, color_map = scale_fill_brewer(palette ="Set1"), show_legend = TRUE)

More usage please see online documentation.

To do

  • Support special symbol for indicating equal work in a project/paper
  • Accept author contributions information in machine-readable formats, e.g. in RIS and Bibtex citation documents provided on journal websites.
Metadata

Version

0.2.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows