Learn R Programming

mispitools (version 1.2.0)

refProp: Generate a dataframe with hair colour, skin colour, eye colour and their specific combination frequencies

Description

This function creates a dataframe that lists every unique combination of hair colour, skin colour, and eye colour in the provided dataset, along with the proportion of occurrences of each combination.

Usage

refProp(data)

Value

A data.frame with columns for hair_colour, skin_colour, eye_colour, and f_h_s_y.

Arguments

data

A data.frame containing the characteristics of individuals.

Examples

Run this code
data <- simRef(1000)
refProp(data)

Run the code above in your browser using DataLab