makeDemoPhotoplotDf: Make the df needed for figure 1

Description Usage Arguments Examples

Description

This function creates the dataframe needed to be able to make the plot of figure 1 comparing photo type to retwets broken down by gender and ethnic appearance

Usage

1
makeDemophotoplotDf(misper_tweets)

Arguments

misper_tweets

cleaned data set of missing persons tweets with all variables coded manually

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
misper_tweets <- structure(list(phototype = structure(c(1L, 1L, 3L, 1L, 1L, 3L,
1L, 2L, 1L, 1L, 2L, 3L, 1L, 1L, 1L, 4L, 1L, 1L, 1L, 2L), .Label = c("No photo",
"Custody photo", "Regular photo", "Muliple photos"), class = "factor"),
    gender_coded = c(NA, NA, "Female", "Male", NA, "Male", "Female",
    "Female", NA, NA, "Male", "Male", "Male", "Male", NA, "Male",
    "Male", "Male", "Male", "Male"), race_coded = c(NA, NA, "white",
    NA, NA, "white", NA, "white", NA, NA, "white", "white", NA,
    NA, NA, "white", "white", "white", NA, "non-white"), retweet_count = c(41L,
    1L, 2L, 85L, 3L, 0L, 0L, 2L, 3L, 12L, 20L, 2L, 1L, 1L, 1L,
    15L, 0L, 1L, 0L, 7L)), row.names = c(NA, 20L), class = "data.frame")

fig_df <- makeDemophotoplotDf(misper_tweets)

maczokni/misperTweetsCode documentation built on May 8, 2020, 5:14 p.m.