Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code of conduct and news #202

Merged
merged 6 commits into from Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.Rmd
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at support@github.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>
1 change: 1 addition & 0 deletions NEWS.md
@@ -1,6 +1,7 @@
## rlistings 0.2.7.9008
* Added relevant tests for pagination when key columns need to be repeated in each page and when they are all empty.
* Added relevant tests for new line characters' handling in footnotes and titles.
* Added cheatsheet.

## rlistings 0.2.7
* Applied `styler` and resolved package lint. Changed default indentation from 4 spaces to 2.
Expand Down
111 changes: 78 additions & 33 deletions README.Rmd
Expand Up @@ -2,6 +2,8 @@
output: github_document
editor_options:
chunk_output_type: console
markdown:
wrap: 72
---

<!-- README.md is generated from README.Rmd. Please edit that file -->
Expand All @@ -15,52 +17,91 @@ knitr::opts_chunk$set(
```

# rlistings

<!-- start badges -->
[![Check 🛠](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml/badge.svg)](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml)
[![Docs 📚](https://github.com/insightsengineering/rlistings/actions/workflows/docs.yaml/badge.svg)](https://insightsengineering.github.io/rlistings/)
[![Code Coverage 📔](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/coverage.xml)

![GitHub forks](https://img.shields.io/github/forks/insightsengineering/rlistings?style=social)
![GitHub Repo stars](https://img.shields.io/github/stars/insightsengineering/rlistings?style=social)

![GitHub commit activity](https://img.shields.io/github/commit-activity/m/insightsengineering/rlistings)
![GitHub contributors](https://img.shields.io/github/contributors/insightsengineering/rlistings)
![GitHub last commit](https://img.shields.io/github/last-commit/insightsengineering/rlistings)
![GitHub pull requests](https://img.shields.io/github/issues-pr/insightsengineering/rlistings)
![GitHub repo size](https://img.shields.io/github/repo-size/insightsengineering/rlistings)
![GitHub language count](https://img.shields.io/github/languages/count/insightsengineering/rlistings)
[![WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Current Version](https://img.shields.io/github/r-package/v/insightsengineering/rlistings/main?color=purple\&label=package%20version)](https://github.com/insightsengineering/rlistings/tree/main)
[![Open Issues](https://img.shields.io/github/issues-raw/insightsengineering/rlistings?color=red\&label=open%20issues)](https://github.com/insightsengineering/rlistings/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)

[![Check
🛠](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml/badge.svg)](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml)
[![Docs
📚](https://github.com/insightsengineering/rlistings/actions/workflows/docs.yaml/badge.svg)](https://insightsengineering.github.io/rlistings/)
[![Code Coverage
📔](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/coverage.xml)

![GitHub
forks](https://img.shields.io/github/forks/insightsengineering/rlistings?style=social)
![GitHub Repo
stars](https://img.shields.io/github/stars/insightsengineering/rlistings?style=social)

![GitHub commit
activity](https://img.shields.io/github/commit-activity/m/insightsengineering/rlistings)
![GitHub
contributors](https://img.shields.io/github/contributors/insightsengineering/rlistings)
![GitHub last
commit](https://img.shields.io/github/last-commit/insightsengineering/rlistings)
![GitHub pull
requests](https://img.shields.io/github/issues-pr/insightsengineering/rlistings)
![GitHub repo
size](https://img.shields.io/github/repo-size/insightsengineering/rlistings)
![GitHub language
count](https://img.shields.io/github/languages/count/insightsengineering/rlistings)
[![WIP -- Initial development is in progress, but there has not yet been
a stable, usable release suitable for the
public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Current
Version](https://img.shields.io/github/r-package/v/insightsengineering/rlistings/main?color=purple&label=package%20version)](https://github.com/insightsengineering/rlistings/tree/main)
[![Open
Issues](https://img.shields.io/github/issues-raw/insightsengineering/rlistings?color=red&label=open%20issues)](https://github.com/insightsengineering/rlistings/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
<!-- end badges -->

## Listings with R

The `rlistings` R package is a package that was designed to create and display listings with R. The focus of this package is to provide functionality for value formatting and ASCII rendering infrastructure for tables and listings. Many of the functions contained in `rlistings` depend on the [`formatters`](https://insightsengineering.github.io/formatters/) package, which provides a framework for ASCII rendering and is available on CRAN.
[![cheatsheet](https://img.shields.io/badge/cheatsheet-rlistings-blue)](https://insightsengineering.github.io/rlistings/inst/cheatsheet/rlistings_cheatsheet_03-24.pdf)

The `rlistings` R package is a package that was designed to create and
display listings with R. The focus of this package is to provide
functionality for value formatting and ASCII rendering infrastructure
for tables and listings. Many of the functions contained in `rlistings`
depend on the
[`formatters`](https://insightsengineering.github.io/formatters/)
package, which provides a framework for ASCII rendering and is available
on CRAN.

`rlistings` development is driven by the need to create regulatory ready listings for health authority review. Some of the key requirements for this undertaking are listed below:
`rlistings` development is driven by the need to create regulatory ready
listings for health authority review. Some of the key requirements for
this undertaking are listed below:

- flexible formatting (pagesize, column widths, alignment, labels, etc.)
- multiple output formats (csv, out, txt)
- repeated key columns
- flexible pagination in both horizontal and vertical directions
- titles and footnotes
- flexible formatting (pagesize, column widths, alignment, labels,
etc.)
- multiple output formats (csv, out, txt)
- repeated key columns
- flexible pagination in both horizontal and vertical directions
- titles and footnotes

`rlistings` currently covers some of these requirements, and remains under active development.
`rlistings` currently covers some of these requirements, and remains
under active development.

## Installation

For releases from October 2022 it is recommended that you [create and use a Github PAT](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to install the latest version of this package. Once you have the PAT, run the following:
For releases from October 2022 it is recommended that you [create and
use a Github
PAT](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)
to install the latest version of this package. Once you have the PAT,
run the following:

```r
``` r
Sys.setenv(GITHUB_PAT = "your_access_token_here")
if (!require("remotes")) install.packages("remotes")
remotes::install_github("insightsengineering/rlistings@*release")
```

The `rlistings` package was not a part of the October 2022 stable release of all `NEST` packages, but the list of these `NEST` packages is available [here](https://github.com/insightsengineering/depository#readme).
The `rlistings` package was not a part of the October 2022 stable
release of all `NEST` packages, but the list of these `NEST` packages is
available
[here](https://github.com/insightsengineering/depository#readme).

See [the Get started page](https://insightsengineering.github.io/rlistings/main/articles/rlistings.html) for an introduction to creating listings using this package.
See [the Get started
page](https://insightsengineering.github.io/rlistings/main/articles/rlistings.html)
for an introduction to creating listings using this package.

## Usage

Expand All @@ -74,22 +115,26 @@ mtcars_ex <- mtcars %>% dplyr::mutate("car" = rownames(mtcars))

as_listing(mtcars_ex,
key_cols = c("gear", "carb"),
cols = c("gear", "carb", "qsec", "car")
disp_cols = c("gear", "carb", "qsec", "car")
) %>% head()
```

## Acknowledgment

This package is a result of a joint effort by many developers and stakeholders. We would like to thank everyone who contributed so far!
This package is a result of a joint effort by many developers and
stakeholders. We would like to thank everyone who contributed so far!

## Stargazers and Forkers

### Stargazers over time

[![Stargazers over time](https://starchart.cc/insightsengineering/rlistings.svg)](https://starchart.cc/insightsengineering/rlistings)
[![Stargazers over
time](https://starchart.cc/insightsengineering/rlistings.svg)](https://starchart.cc/insightsengineering/rlistings)

### Stargazers

[![Stargazers repo roster for @insightsengineering/rlistings](https://reporoster.com/stars/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/stargazers)
[![Stargazers repo roster for
](https://reporoster.com/stars/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/stargazers)

[![Forkers repo roster for @insightsengineering/rlistings](https://reporoster.com/forks/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/network/members)
[![Forkers repo roster for
](https://reporoster.com/forks/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/network/members)
64 changes: 32 additions & 32 deletions README.md
@@ -1,15 +1,16 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# rlistings <a href='https://github.com/insightsengineering/rlistings'><img src="man/figures/logo.png" align="right" height="200" width="200"/></a>
# rlistings

<!-- start badges -->

[![Check
🛠](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml/badge.svg)](https://insightsengineering.github.io/rlistings/main/unit-test-report/)
🛠](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml/badge.svg)](https://github.com/insightsengineering/rlistings/actions/workflows/check.yaml)
shajoezhu marked this conversation as resolved.
Show resolved Hide resolved
[![Docs
📚](https://github.com/insightsengineering/rlistings/actions/workflows/docs.yaml/badge.svg)](https://insightsengineering.github.io/rlistings/)
[![Code Coverage
📔](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/badge.svg)](https://insightsengineering.github.io/rlistings/main/coverage-report/)
📔](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/insightsengineering/rlistings/_xml_coverage_reports/data/main/coverage.xml)

![GitHub
forks](https://img.shields.io/github/forks/insightsengineering/rlistings?style=social)
Expand Down Expand Up @@ -39,6 +40,8 @@ Issues](https://img.shields.io/github/issues-raw/insightsengineering/rlistings?c

## Listings with R

[![cheatsheet](https://img.shields.io/badge/cheatsheet-rlistings-blue)](https://insightsengineering.github.io/rlistings/inst/cheatsheet/rlistings_cheatsheet_03-24.pdf)

The `rlistings` R package is a package that was designed to create and
display listings with R. The focus of this package is to provide
functionality for value formatting and ASCII rendering infrastructure
Expand All @@ -63,54 +66,51 @@ under active development.

## Installation

`rlistings` is available on CRAN and you can install the latest released
version with:

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

or you can install the latest development version directly from GitHub
with:
For releases from October 2022 it is recommended that you [create and
use a Github
PAT](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)
to install the latest version of this package. Once you have the PAT,
run the following:

``` r
remotes::install_github("insightsengineering/formatters")
remotes::install_github("insightsengineering/rlistings")
Sys.setenv(GITHUB_PAT = "your_access_token_here")
if (!require("remotes")) install.packages("remotes")
remotes::install_github("insightsengineering/rlistings@*release")
```

Note you might need to set your `GITHUB_PAT` environment variable in
order to be able to install from GitHub.
The `rlistings` package was not a part of the October 2022 stable
release of all `NEST` packages, but the list of these `NEST` packages is
available
[here](https://github.com/insightsengineering/depository#readme).

Packaged releases (both those on CRAN and those between official CRAN
releases) can be found in the [releases
list](https://github.com/insightsengineering/rlistings/releases).
See [the Get started
page](https://insightsengineering.github.io/rlistings/main/articles/rlistings.html)
for an introduction to creating listings using this package.

## Usage

The following example shows a simple listing and its printed output.

``` r
library(rlistings)
#> Warning: package 'rlistings' was built under R version 4.2.2
#> Loading required package: formatters
#> Warning: package 'formatters' was built under R version 4.2.2
#> Loading required package: tibble

# Reducing the data
mtcars_ex <- mtcars %>% dplyr::mutate("car" = rownames(mtcars))

as_listing(mtcars_ex,
key_cols = c("gear", "carb"),
cols = c("gear", "carb", "qsec", "car")
disp_cols = c("gear", "carb", "qsec", "car")
) %>% head()
#> sorting incoming data by key columns
#> gear carb qsec car
#> gear carb qsec car
#> ———————————————————————————————————————
#> 3 1 19.44 Hornet 4 Drive
#> 20.22 Valiant
#> 20.01 Toyota Corona
#> 2 17.02 Hornet Sportabout
#> 16.87 Dodge Challenger
#> 3 1 19.44 Hornet 4 Drive
#> 20.22 Valiant
#> 20.01 Toyota Corona
#> 2 17.02 Hornet Sportabout
#> 16.87 Dodge Challenger
#> 17.3 AMC Javelin
```

Expand All @@ -128,8 +128,8 @@ time](https://starchart.cc/insightsengineering/rlistings.svg)](https://starchart

### Stargazers

[![Stargazers repo roster for
@insightsengineering/rlistings](https://reporoster.com/stars/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/stargazers)
[![Stargazers repo roster
for](https://reporoster.com/stars/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/stargazers)

[![Forkers repo roster for
@insightsengineering/rlistings](https://reporoster.com/forks/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/network/members)
[![Forkers repo roster
for](https://reporoster.com/forks/insightsengineering/rlistings)](https://github.com/insightsengineering/rlistings/network/members)
1 change: 1 addition & 0 deletions inst/WORDLIST
Expand Up @@ -7,6 +7,7 @@ README
Repo
Rua
WIP
cheatsheet
colnm
csv
customizations
Expand Down