Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hrbrmstr/pluralize

An R package to "Pluralize and Singularize Any Word"
https://github.com/hrbrmstr/pluralize

plural r rstats singularize

Last synced: 10 days ago
JSON representation

An R package to "Pluralize and Singularize Any Word"

Awesome Lists containing this project

README

        

---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
hrbrpkghelpr::global_opts()
```

```{r badges, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::stinking_badges()
```

```{r description, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::yank_title_and_description()
```

## What's Inside The Tin

The following functions are implemented:

```{r ingredients, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::describe_ingredients()
```

## Installation

```{r install-ex, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::install_block()
```

## Usage

```{r lib-ex}
library(pluralize)

# current version
packageVersion("pluralize")

```

```{r ex-01}
pluralize('test')

singularize('test')

singularize(c("boats", "houses", "cats", "rivers"))

pluralize(singularize(c("boats", "houses", "cats", "rivers")))

singularize(c("buses", "wishes", "pitches", "boxexs"))

pluralize(singularize(c("buses", "wishes", "pitches", "boxexs")))

singularize(c("pennies", "spies", "babies", "cities", "daisies"))

pluralize(singularize(c("pennies", "spies", "babies", "cities", "daisies")))

singularize(c("sheep", "fish", "deer", "species", "aircraft"))

pluralize(singularize(c("sheep", "fish", "deer", "species", "aircraft")))

pluralize('test', 5)

pluralize('test', 5, TRUE)

pluralize('regex')

add_plural_rule("gex", "gexii")

pluralize('regex')

singularize('singles')

add_singular_rule("singles", "singular")

singularize('singles')

pluralize("irregular")

pluralize(c("woman", "man", "child", "tooth", "foot", "person", "leaf"))

singularize(c("woman", "man", "child", "tooth", "foot", "person", "leaf"))

add_irregular_rule("irregular", "regular")

pluralize("irregular")

pluralize("paper")

add_uncountable_rule("paper")

pluralize("paper")
```

### pluralize Metrics

```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```

## Code of Conduct

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.