rbin

Tools for binning data

https://github.com/rsquaredacademy/rbin

Science Score: 26.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
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

binning logistic-regression rstats woe-and-iv woebinning
Last synced: 6 months ago · JSON representation

Repository

Tools for binning data

Basic Info
Statistics
  • Stars: 13
  • Watchers: 2
  • Forks: 3
  • Open Issues: 7
  • Releases: 4
Topics
binning logistic-regression rstats woe-and-iv woebinning
Created over 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Code of conduct

README.Rmd

---
output: github_document
---



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

> Tools for binning data


[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rbin)](https://cran.r-project.org/package=rbin) 
[![R-CMD-check](https://github.com/rsquaredacademy/rbin/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rsquaredacademy/rbin/actions/workflows/R-CMD-check.yaml)
[![Coverage status](https://codecov.io/gh/rsquaredacademy/rbin/branch/master/graph/badge.svg)](https://app.codecov.io/github/rsquaredacademy/rbin?branch=master) 


## Installation

```{r cran-installation, eval = FALSE}
# Install rbin from CRAN
install.packages("rbin")

# Or the development version from GitHub
# install.packages("devtools")
devtools::install_github("rsquaredacademy/rbin")
```

## Addins

rbin includes two addins for manually binning data:

- `rbinAddin()`
- `rbinFactorAddin()`

## Usage

```{r, echo=FALSE, message=FALSE}
library(rbin)
```

### Manual Binning

```{r manual}
bins <- rbin_manual(mbank, y, age, c(29, 31, 34, 36, 39, 42, 46, 51, 56))
bins 

# plot
plot(bins)
```

### Combine Factor Levels

```{r factor}
# combine levels
upper <- c("secondary", "tertiary")
out <- rbin_factor_combine(mbank, education, upper, "upper")
table(out$education)

# bins
bins <- rbin_factor(out, y, education)
bins 

# plot
plot(bins)
```

### Quantile Binning

```{r quantile}
bins <- rbin_quantiles(mbank, y, age, 10)
bins 

# plot
plot(bins)
```

### Winsorized Binning

```{r winsorize}
bins <- rbin_winsorize(mbank, y, age, 10, winsor_rate = 0.05)
bins 

# plot
plot(bins)
```

### Equal Length Binning

```{r equal_length}
bins <- rbin_equal_length(mbank, y, age, 10)
bins 

# plot
plot(bins)
```

## Alternatives

- [smbinning](https://CRAN.R-project.org/package=smbinning)
- [logiBin](https://CRAN.R-project.org/package=logiBin)
- [woeBinning](https://CRAN.R-project.org/package=woeBinning)
- [binr](https://CRAN.R-project.org/package=binr)

## Getting Help

If you encounter a bug, please file a minimal reproducible example using 
[reprex](https://reprex.tidyverse.org/index.html) on github. For questions 
and clarifications, use [StackOverflow](https://stackoverflow.com/).

## Code of Conduct

Please note that the rbin project is released with a [Contributor Code of Conduct](https://rbin.rsquaredacademy.com/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

Owner

  • Name: Rsquared Academy
  • Login: rsquaredacademy
  • Kind: organization
  • Email: pkgs@rsquaredacademy.com
  • Location: Bengaluru, India

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 3
  • Push event: 6
  • Pull request event: 4
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 3
  • Push event: 6
  • Pull request event: 4

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 123
  • Total Committers: 1
  • Avg Commits per committer: 123.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
rsquaredin r****n@g****m 123

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 53
  • Total pull requests: 38
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 1 hour
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 0.3
  • Average comments per pull request: 0.0
  • Merged pull requests: 38
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 4
  • Average time to close issues: about 2 hours
  • Average time to close pull requests: 9 minutes
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aravindhebbali (38)
  • paleolimbot (1)
  • bjoern-1 (1)
Pull Request Authors
  • aravindhebbali (24)
Top Labels
Issue Labels
feature (12) enhancement (11) docs (5) bug (2) release (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 529 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: rbin

Tools for Binning Data

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 529 Last month
Rankings
Forks count: 14.2%
Stargazers count: 15.1%
Average: 21.2%
Dependent repos count: 24.0%
Downloads: 24.0%
Dependent packages count: 28.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.3 depends
  • data.table * imports
  • ggplot2 * imports
  • stats * imports
  • utils * imports
  • covr * suggests
  • graphics * suggests
  • knitr * suggests
  • miniUI * suggests
  • rmarkdown * suggests
  • rstudioapi * suggests
  • shiny * suggests
  • testthat * suggests
  • vdiffr * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/rhub.yaml actions
  • r-hub/actions/checkout v1 composite
  • r-hub/actions/platform-info v1 composite
  • r-hub/actions/run-check v1 composite
  • r-hub/actions/setup v1 composite
  • r-hub/actions/setup-deps v1 composite
  • r-hub/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite