Skip to content

genderBR

1.4.0Package record

Predict Gender from Brazilian First Names

0packages depend
6.1Kdownloads / year
52.8%test coverage
13/13flavors OK

Overview

About

A generalized method to predict and report gender from Brazilian first names using the Brazilian Institute of Geography and Statistics' Census data and neural networks.

Changes in 1.4.0

This is a new version that introduces a new feature: asymmetrical thresholds for gender classification. In the previous versions, users could set a single threshold to classify names as female or male -- and they could overlap if the threshold was too low. Now, users can set a different threshold for each sex, and there is a new check to prevent overlapping thresholds. The release also includes other improvements and bug fixes.

  • The threshold argument of get_gender() and get_gender_nn() now accepts a vector with two values, allowing users to set a different threshold for each sex: the first value is used to classify females and the second, males (e.g., threshold = c(0.9, 0.8)). The two values can also be named, in any order (c(Female = 0.9, Male = 0.8) or c(F = 0.9, M = 0.8)). A single value keeps setting a symmetrical threshold, as before.
  • Thresholds that sum to less than 1 are now rejected with an informative error. These values make the female and male bands overlap, so a name could be classified as both. This also applies to a single threshold below 0.5, which was silently accepted before and gave inconsistent results between get_gender() and get_gender_nn().
  • Added an nn_size argument to get_gender_nn() and get_gender(nn = TRUE) that splits a large input vector of names into batches. This keeps avoids out-of-memory crashes on big vectors. Defaults to NULL (all names classified in a single pass).
  • Added a device argument to get_gender_nn() and get_gender(nn = TRUE) to run neural network inference on a GPU ("cuda" or "mps") instead of the default CPU for faster predictions.
  • Fixed a vocabulary mismatch in the neural network encoder: characters not in the model vocabulary were mapped to <PAD> instead of the <UNK>. Names containing rare characters are now handled correctly.
  • Moved torch from Imports to Suggests. The neural network model is now built only when the NN backend (get_gender_nn() or get_gender(nn = TRUE)) is used. A clear message tells users to install torch when it is not available. The default methods no longer require torch.
  • Added new tests for the new features and fixes.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.2 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.4.0
READMEYes · 1,184 wordsVignettesNoNEWSYes · 100% structured · mentions 1.4.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
6
Examples that run
20%1 run in a plain check · 4 never run
Exported functions with examples
83%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
33%

Downloads

6.1K
CRAN downloads in the past year
Rank #8,895 · ~17/day · ~509/mo
Daily download trend is not available in this view yet.
42130 days
1.1K90 days
6.1K1 year
Compare downloads with other packages →
Also on124 r2u5 autocran

Repository

66Stars
10Forks
0Open issues
0Open PRs
3Releases
78Commits
2Commit identities
ibgegenderbrazilcran
License file reads as GPL-2.0 · 78 commits · Last activity 2026-07-12 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
71%
Median days to close, 50 most recently updated closed issues
10
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-08-19 · 642026-07-07 · 66
PracticesBeta

10 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/meirelesff/genderbr on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Contributing guide
Docs source (1)
README.Rmd
Coverage (1)
Coverage reporting
Show all practicesHide 3 practices
Reproducibility and dev environment (2)
data-raw/Makefile
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
9 external dependencies (excludes base and recommended)

Installing genderBR adds 16 packages (13 with compiled code, 12 MB of source tarballs). Heaviest: data.table 5.7 MB, openssl 1.1 MB, jsonlite 1.0 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 1.0.1 (2017)
Releases (7)

Pick two releases to compare their code metrics.

  • 1.4.0Latest
    record
    2026-07-12 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 1.3.0
    record
    2026-03-30 · diff ↗ ·
    added 3 exports
    clear_nn_cache, download_gender_model, get_gender_nn
  • 1.2.0
    record
    2026-01-15 · diff ↗ ·
    removed 1 export
    %>%
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • unarchivedReturned to CRAN
    2021-05-02
  • 1.1.2
    record
    2021-05-02 · diff ↗
  • archivedRemoved from CRAN
    2021-02-21
    policy violation On Internet access
  • 1.1.1
    record
    2021-02-15 · diff ↗ ·
    added 1 export
    %>%
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
Show 3 earlier eventsHide 3 earlier events

Package metadata

First published
2017-09-05
Total releases
7 / 9 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.1.0
Download size
673 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("genderBR")
Meireles, F. (2026). genderBR: Predict Gender from Brazilian First Names (Version 1.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.genderBR

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for genderBR version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy