Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bisaloo/numberize
Numberize digit words in English, French and Spanish.
https://github.com/bisaloo/numberize
Last synced: 11 days ago
JSON representation
Numberize digit words in English, French and Spanish.
- Host: GitHub
- URL: https://github.com/bisaloo/numberize
- Owner: Bisaloo
- License: other
- Created: 2023-08-31T12:22:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-31T12:22:41.000Z (over 1 year ago)
- Last Synced: 2024-10-24T16:18:31.099Z (about 2 months ago)
- Homepage: https://bahadzie.github.io/numberize/
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = file.path(c("man", "figures", "README-")),
out.width = "100%"
)
```# _{{ packagename }}_
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/mit/)
[![R-CMD-check](https://github.com/{{ gh_repo }}/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/{{ gh_repo }}/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/{{ gh_repo }}/branch/main/graph/badge.svg)](https://app.codecov.io/gh/{{ gh_repo }}?branch=main)
[![lifecycle-{{ recon }}](https://www.reconverse.org/images/badge-{{ recon }}.svg)](https://www.reconverse.org/lifecycle.html#{{ recon }})_{{ packagename }}_ is an R package to convert numbers written as English, French or Spanish words from `"zero"` to `"nine hundred and ninety nine trillion, nine hundred and ninety nine billion, nine hundred and ninety nine million, nine hundred and ninety nine thousand, nine hundred and ninety nine"` from a character string to a numeric value.
_{{ packagename }}_ is developed at the [{{ department }}]({{ department_url }}) at the {{ institution }} as part of the [Epiverse-TRACE program](https://data.org/initiatives/epiverse/).
## Installation
You can install the development version of _{{ packagename }}_ from
[GitHub](https://github.com/) with:```{r eval=TRUE}
# install.packages("pak")
pak::pak("{{ gh_repo }}")
library("numberize")
```## Example
These examples illustrate the current functionality.
```{r eval=TRUE}
# numberize a French string
numberize("zéro", lang = "fr")# numberize a Spanish string
numberize("Siete mil quinientos cuarenta y cinco", lang = "es")# numberize the English string "nine hundred and ninety-nine trillion, nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine" # nolint: line_length_linter.
formatC(numberize("nine hundred and ninety-nine trillion, nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine"), big.mark = ",", format = "fg") # nolint: line_length_linter.# some edge cases
numberize("veintiún", lang = "es")
numberize("veintiuno", lang = "es")
```## Development
### Lifecycle
This package is currently *{{ recon }}*, as defined by the [RECON software
lifecycle](https://www.reconverse.org/lifecycle.html).### Contributions
Contributions are welcome via [pull requests](https://github.com/{{ gh_repo }}/pulls).
### Code of Conduct
Please note that the _{{ packagename }}_ project is released with a
[Contributor Code of Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.