Learn R Programming

GenderInfer

The goal of GenderInfer is to analysed data for gender differences in publishing. It assigns the gender based on the first name. It should only be used when self-reported gender is unavailable. This package let possible to find if there are significant differences between male and female from a specified baselines.

Installation

You can install the released version of GenderInfer from CRAN with:

install.packages("GenderInfer")

It is also possible to install the package directly from bitbucket

devtools::install_bitbucket("rscapplications/genderinfer")

The package use the following packages as dependencies:

  binom
  ggplot2

Example

This is a basic example which shows you how to assign gender to a data frame containing first names:

library(GenderInfer)
## assign gender
authors_df <- assign_gender(data_df = authors, first_name_col = first_name)
head(authors_df)

Copy Link

Version

Install

install.packages('GenderInfer')

Monthly Downloads

196

Version

0.1.0

License

MIT + file LICENSE

Maintainer

Rita Giordano

Last Published

September 29th, 2021

Functions in GenderInfer (0.1.0)

theme_gd

This function create a gender diversity theme for chart based on ggplot2
total_gender_df

Create a dataframe that will be the input to generate the bar chart of the full amount of female and male
reshape_for_binomials

Reshape the dataframe to make it easier to carry out binomial calculations.
bullet_chart

Create a bullet chart with significance bars to compare different baselines in percentage for gender analysis
stacked_bar_chart

Create a stacked bar chart with significance bars to compare with the female baseline for gender analysis.
calculate_binom_baseline

Calculate binomials and significance for multiple baselines.
percent_df

Create a dataframe that will be the input to generate stacked bar chart and bullet chart that show percentage to compare proportions among gender.
bar_chart

Function to create a bar chart of the total number by gender
balloon_plot

Function to create the balloon plot for gender first name
authors

names dataset
bullet_line_chart

Function to create a bullet chart with a line chart in the same graphical frame; to compare different baselines for gender analysis.
assign_gender

Assign gender by first name
baseline

Calculate the female baseline
gender_names

Gender names dataset