profiles: Visual Profile Analysis

Description Usage Arguments Examples

View source: R/profiles.R

Description

This function will create a graph that compares the levels of a single categorical predictor variable against 3 different categorical response variables. The x axis will be the categorical variable. The y axis will the proportion of each level of the predictor variable that displays the response variable.

Usage

1
profiles(df, x1, y1, y2, y3)

Arguments

df

, df, a data frame with at least 4 categorical columns

x1

, x, index of a binary (0,1) column in the data frame to use as the predictor variable

y1

, y1, index of a binary (0,1) column in the data frame to use as the first response variable

y2

, y2, index of a binary (0,1) column in the data frame to use as the second response variable

y3

, y3, index of a binary (0,1) column in the data frame to use as the third response variable

Examples

1
2
dataframe <- rotateS21::covidWrangled
profiles(dataframe, 3, 17, 18, 19)

s-huebler/rotateS21 documentation built on Dec. 22, 2021, 8:21 p.m.