### R Script to reproduce results in the 2022 CES Report ### Raw data for 2022 available at https://heterodoxacademy.org/campus-expression-survey ### This script reproduces all analyses for 2022 data. Data from prior years are available on our website at https://heterodoxacademy.org/campus-expression-survey ### Questions? Contact questions@heterodoxacademy.org ### Citation: Zhou, S. & Barbaro, N. (2023). Understanding Student Expression Across Higher Ed: Heterodox Academy’s Annual Campus Expression Survey. Heterodox Academy. ## Data Import and Preparation #### library(tidyverse) ces2022 <- readr::read_csv("CES_F2022_FinalDataPublic.csv") # Convert variables to factor ces2022$student_interaction <- factor(ces2022$student_interaction, ordered = T, levels = c("Low","Medium","High")) ces2022$Lonely <- factor(ces2022$Lonely, ordered = T, levels = c("Hardly ever", "Some of the time", "Often")) ces2022$noncontroversial_dis <- factor(ces2022$noncontroversial_dis, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$gender_discuss <- factor(ces2022$gender_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$politics_discuss <- factor(ces2022$politics_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$race_discuss <- factor(ces2022$race_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$religion_discuss <- factor(ces2022$religion_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$sexualorientation_di <- factor(ces2022$sexualorientation_di, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$covid_discuss <- factor(ces2022$covid_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$freespeech_discuss <- factor(ces2022$freespeech_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$abortion_discuss <- factor(ces2022$abortion_discuss, ordered = T, levels = c("Very Comfortable", "Somewhat Comfortable", "Somewhat Reluctant", "Very Reluctant")) ces2022$views_encouraged <- factor(ces2022$views_encouraged, ordered = T, levels = c("Never", "Very rarely", "Rarely", "Occasionally", "Frequently", "Very frequently")) ces2022$freeexpression_campu <- factor(ces2022$freeexpression_campu, ordered = T, levels = c("Strongly disagree", "Somewhat disagree", "Somewhat agree", "Strongly agree")) ces2022$yearinschool <- factor(ces2022$yearinschool, ordered = T, levels = c("First year", "Sophomore", "Junior", "Senior", "Senior Plus")) ces2022$familyses_demo <- factor(ces2022$familyses_demo, ordered = T, levels = c("Less than $20,000", "$20,000 to $29,999", "$30,000 to $39,999", "$40,000 to $49,999", "$50,000 to $74,999", "$75,000 to $99,999", "$100,000 to $149,999", "$150,000 to $199,999", "$200,000 to $249,999", "$250,000 to $499,999", "$500,000 or more")) ## The Student Sample by the Numbers #### # Public v. Private ces2022 %>% group_by(pub_priv) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Region ces2022 %>% group_by(region) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Education Modality ces2022 %>% group_by(Online) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Trichotomized temp <- ces2022 %>% filter(Online == "Fully in person" | Online == "Primarily in person") %>% select(PID) ces2022$online_trich <- as.character(ces2022$Online) ces2022[c(temp$PID), "online_trich"] <- "In person" temp <- ces2022 %>% filter(Online == "Fully online" | Online == "Primarily online") %>% select(PID) ces2022[c(temp$PID), "online_trich"] <- "Online" temp <- ces2022 %>% filter(Online == "Roughly equal portions of in-person and online classes") %>% select(PID) ces2022[c(temp$PID), "online_trich"] <- "Balanced" temp <- ces2022 %>% filter(Online == "Other") %>% select(PID) ces2022[c(temp$PID), "online_trich"] <- NA ces2022$online_trich <- factor(ces2022$online_trich, ordered = T, levels = c("Online","Balanced", "In person")) rm(temp) ces2022 %>% group_by(online_trich) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Year in School ces2022 %>% group_by(yearinschool) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Combine Senior with Senior Plus temp <- ces2022 %>% filter(yearinschool == "Senior" | yearinschool == "Senior Plus") %>% select(PID) ces2022$yearinschool <- as.character(ces2022$yearinschool) ces2022[c(temp$PID), "yearinschool"] <- "Senior or more" ces2022$yearinschool <- factor(ces2022$yearinschool, ordered = T, labels = c("First year", "Sophomore", "Junior", "Senior or more")) ces2022 %>% group_by(yearinschool) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) rm(temp) # Gender ces2022 %>% group_by(genderid_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Due to < 1% in "self-identify", we combined the two non-binary groups into "Other": temp <- ces2022 %>% filter(genderid_demo == "Other" | genderid_demo == "Nonbinary") %>% select(PID) ces2022[c(temp$PID), "genderid_demo"] <- "Other" ces2022 %>% group_by(genderid_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) rm(temp) # Sexual Orientation ces2022 %>% group_by(sexualorient_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Religion ces2022 %>% group_by(religion_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Race or Ethnicity ces2022 %>% group_by(race_ethnicity_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Due to < 1% in "American Indian", "Native Hawaiian", and "Other", we combined the three groups into "Other": temp <- ces2022 %>% filter(race_ethnicity_demo == "American Indian or Alaska Native" | race_ethnicity_demo == "Native Hawaiian or Other Pacific Islander" | race_ethnicity_demo == "Other") %>% select(PID) ces2022[c(temp$PID), "race_ethnicity_demo"] <- "Other" ces2022 %>% group_by(race_ethnicity_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) rm(temp) # Political Party ces2022 %>% group_by(politicalparty_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Family SES ces2022 %>% group_by(familyses_demo) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) ## Takeaway 1 #### # Dichotomize responses into Reluctant vs. Comfortable ces2022$noncontroversial_dich <- ces2022$noncontroversial_dis levels(ces2022$noncontroversial_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$gender_dich <- ces2022$gender_discuss levels(ces2022$gender_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$politics_dich <- ces2022$politics_discuss levels(ces2022$politics_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$race_dich <- ces2022$race_discuss levels(ces2022$race_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$religion_dich <- ces2022$religion_discuss levels(ces2022$religion_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$sexuality_dich <- ces2022$sexualorientation_di levels(ces2022$sexuality_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$covid_dich <- ces2022$covid_discuss levels(ces2022$covid_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$freespeech_dich <- ces2022$freespeech_discuss levels(ces2022$freespeech_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") ces2022$abortion_dich <- ces2022$abortion_discuss levels(ces2022$abortion_dich) <- c("Comfortable", "Comfortable", "Reluctant", "Reluctant") # Compute Reluctance over any of the five controversial topics in general 1-sum(is.na(ces2022$consequences_closed))/nrow(ces2022) # Create table of proportions for percent reluctant across topics tough_topics <- rbind( round(summary(ces2022$noncontroversial_dich)/length(ces2022$noncontroversial_dich),3), round(summary(ces2022$gender_dich)/length(ces2022$gender_dich),3), round(summary(ces2022$politics_dich)/length(ces2022$politics_dich),3), round(summary(ces2022$race_dich)/length(ces2022$race_dich),3), round(summary(ces2022$religion_dich)/length(ces2022$religion_dich),3), round(summary(ces2022$sexuality_dich)/length(ces2022$sexuality_dich),3), round(summary(ces2022$covid_dich)/length(ces2022$covid_dich),3), round(summary(ces2022$freespeech_dich)/length(ces2022$freespeech_dich),3), round(summary(ces2022$abortion_dich)/length(ces2022$abortion_dich),3) ) tough_topics <- as.data.frame(tough_topics) tough_topics$topic <- c("noncontroversial", "gender", "politics", "race", "religion", "sexual orientation", "covid", "free speech", "abortion") tough_topics <- select(tough_topics, topic, Reluctant) names(tough_topics)[2] <- "2022 % Reluctant" tough_topics # Setup test of demographics X reluctance to discuss tough topics test_results <- data.frame("demographic" = c("pub_priv", "region", "online_trich", "student_interaction", "yearinschool", "genderid_demo", "race_ethnicity_demo", "politicalparty_demo", "religion_demo", "sexualorient_demo", "familyses_demo"), "noncontroversial" = NA, "gender" = NA, "politics"= NA, "race" = NA, "religion" = NA, "sexual_orientation" = NA) # Fisher's exact tests between demographic groups and dichotomized "reluctance to discuss" variables x <- c("pub_priv", "region", "online_trich", "student_interaction", "yearinschool", "genderid_demo", "race_ethnicity_demo", "politicalparty_demo", "religion_demo", "sexualorient_demo", "familyses_demo") y <- c("noncontroversial_dich", "gender_dich", "politics_dich", "race_dich", "religion_dich", "sexuality_dich") for (i in 1:length(x)) { for (j in 1:length(y)) { temp <- fisher.test(table(as.matrix(ces2022[,x[i]]), as.matrix(ces2022[,y[j]])), simulate.p.value = T) if (temp$p.value < 0.05) { test_results[i,j+1] <- paste0("p = ", round(temp$p.value,3)) } else { test_results[i,j+1] <- paste0("") } } } rm(i, j, x, y, temp) test_results # Significant result #1: political orientation X reluctance y <- c("noncontroversial_dich", "gender_dich", "politics_dich", "race_dich", "religion_dich", "sexuality_dich") result1 <- data.frame("political_party" = names(table(ces2022$politicalparty_demo)), "noncontroversial" = NA, "gender" = NA, "politics"= NA, "race" = NA, "religion" = NA, "sexual_orientation" = NA) for (i in 1:length(y)) { temp <- table(as.matrix(ces2022[,"politicalparty_demo"]), as.matrix(ces2022[,y[i]])) temp <- as.data.frame.matrix(temp) temp <- mutate(temp, "perc_reluctant" = Reluctant / (Comfortable + Reluctant)) temp <- round(temp, 2)[,3] result1[,i+1] <- temp } rm(y, temp) result1 # Significant result #2: race/ethnicity X reluctance y <- c("noncontroversial_dich", "gender_dich", "politics_dich", "race_dich", "religion_dich", "sexuality_dich") result2 <- data.frame("race_ethnicity" = names(table(ces2022$race_ethnicity_demo)), "noncontroversial" = NA, "gender" = NA, "politics"= NA, "race" = NA, "religion" = NA, "sexual_orientation" = NA) for (i in 1:length(y)) { temp <- table(as.matrix(ces2022[,"race_ethnicity_demo"]), as.matrix(ces2022[,y[i]])) temp <- as.data.frame.matrix(temp) temp <- mutate(temp, "perc_reluctant" = Reluctant / (Comfortable + Reluctant)) temp <- round(temp, 2)[,3] result2[,i+1] <- temp } rm(y, temp) result2 # Significant result #3: gender X reluctance to discuss abortion result3 <- data.frame("gender" = names(table(ces2022$genderid_demo)), "abortion" = NA) temp <- table(as.matrix(ces2022[,"genderid_demo"]), as.matrix(ces2022[,"abortion_dich"])) temp <- as.data.frame.matrix(temp) temp <- mutate(temp, "perc_reluctant" = Reluctant / (Comfortable + Reluctant)) temp <- round(temp, 2)[,3] result3[,2] <- temp rm(temp) result3 ## Takeaway 2 #### # Qualitative coding of open-ended comments available upon request # Out of 915 students who expressed some level of reluctance, and thus answered the "consequences" question consequences_results <- data.frame("consequence" = c("Other students would criticize my views as offensive.", "Other students would make critical comments about me with other people after class.", "The professor would say my views are wrong.", "The professor would criticize my views as offensive.", "The professor would give me a lower grade because of my views.", "Someone would post critical comments about my views on social media.", "Someone would file a complaint claiming my views violated a campus harassment policy.", "I would cause others psychological harm.", "Other concerns of consequences? Please list below."), "n" = NA) x <- consequences_results$consequence for (i in 1:length(x)){ consequences_results[i,2] <- sum(grepl(x[i], ces2022$consequences_closed, fixed = TRUE)) } rm(i, x) consequences_results <- mutate(consequences_results, "prop" = n/915) %>% arrange(desc(prop)) consequences_results # Out of all 1564 students who answered the "consequences_own" question: consequences_own_results <- data.frame("consequence_own" = c("I would speak out to criticize that classmate as being offensive during that discussion.", "I would not say anything during class but I would make critical comments about it with other people afterwards.", "I would post critical comments about his or her views on social media (anonymously or not).", "I would file a harassment complaint or code of conduct violation.", "I would not say or do anything about it but I would think badly of that student.", "I would ask questions about their opinion so I can understand it better.", "Other actions you might take? Please list below."), "n" = NA) x <- consequences_own_results$consequence_own for (i in 1:length(x)){ consequences_own_results[i,2] <- sum(grepl(x[i], ces2022$OwnConsequences_clos, fixed = TRUE)) } rm(i, x) consequences_own_results <- mutate(consequences_own_results, "prop" = n/1564) %>% arrange(desc(prop)) consequences_own_results ## Takeaway 3 #### # 2022 Education Modality ces2022 %>% group_by(online_trich) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # 2022Student Interaction ces2022 %>% group_by(student_interaction) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # 2022 Loneliness ces2022 %>% group_by(Lonely) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Significant result #4 from Fisher's exact test (see Takeaway #1 code): student interaction X reluctance y <- c("noncontroversial_dich", "gender_dich", "politics_dich", "race_dich", "religion_dich", "sexuality_dich") result4 <- data.frame("student_interaction" = c("High", "Low", "Medium"), "noncontroversial" = NA, "gender" = NA, "politics"= NA, "race" = NA, "religion" = NA, "sexual_orientation" = NA) for (i in 1:length(y)) { temp <- table(as.matrix(ces2022[,"student_interaction"]), as.matrix(ces2022[,y[i]])) temp <- as.data.frame.matrix(temp) temp <- mutate(temp, "perc_reluctant" = Reluctant / (Comfortable + Reluctant)) temp <- round(temp, 2)[,3] result4[,i+1] <- temp } rm(y, temp) result4 # Relationship between modality of learning and student interaction (significant) fisher.test(table(as.matrix(ces2022$online_trich), as.matrix(ces2022$student_interaction)), simulate.p.value = T) # Interaction between modality of learning and self-censorship (not significant) fisher.test(table(as.matrix(ces2022$online_trich), as.matrix(ces2022$gender_dich)), simulate.p.value = T) fisher.test(table(as.matrix(ces2022$online_trich), as.matrix(ces2022$politics_dich)), simulate.p.value = T) fisher.test(table(as.matrix(ces2022$online_trich), as.matrix(ces2022$race_dich)), simulate.p.value = T) fisher.test(table(as.matrix(ces2022$online_trich), as.matrix(ces2022$religion_dich)), simulate.p.value = T) fisher.test(table(as.matrix(ces2022$online_trich), as.matrix(ces2022$sexuality_dich)), simulate.p.value = T) ## Takeaway 4 #### # Feeling like views are encouraged ces2022 %>% group_by(views_encouraged) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) # Free expression on campus ces2022 %>% group_by(freeexpression_campu) %>% summarize("n" = n()) %>% mutate("prop" = n / sum(n)) ## Crosstabs - write to Clipboard to paste into crosstab appendix #### # All demographic headers table(ces2022$genderid_demo) table(ces2022$race_ethnicity_demo) table(ces2022$politicalparty_demo) table(ces2022$religion_demo) table(ces2022$sexualorient_demo) table(ces2022$familyses_demo) table(ces2022$pub_priv) table(ces2022$region) table(ces2022$yearinschool) table(ces2022$online_trich) table(ces2022$student_interaction) # Totals write.table(as.vector(table(ces2022$politics_discuss)/1564), "clipboard", row.names = F, col.names = F) write.table(as.vector(table(ces2022$race_discuss)/1564), "clipboard", row.names = F, col.names = F) write.table(as.vector(table(ces2022$religion_discuss)/1564), "clipboard", row.names = F, col.names = F) write.table(as.vector(table(ces2022$sexualorientation_di)/1564), "clipboard", row.names = F, col.names = F) write.table(as.vector(table(ces2022$gender_discuss)/1564), "clipboard", row.names = F, col.names = F) write.table(as.vector(table(ces2022$noncontroversial_dis)/1564), "clipboard", row.names = F, col.names = F) # By Demographic - Politics write.table(prop.table(table(ces2022$politics_discuss, ces2022$genderid_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$race_ethnicity_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$politicalparty_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$religion_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$sexualorient_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$familyses_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$pub_priv), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$region), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$yearinschool), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$online_trich), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$politics_discuss, ces2022$student_interaction), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) # By Demographic - Race write.table(prop.table(table(ces2022$race_discuss, ces2022$genderid_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$race_ethnicity_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$politicalparty_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$religion_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$sexualorient_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$familyses_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$pub_priv), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$region), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$yearinschool), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$online_trich), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$race_discuss, ces2022$student_interaction), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) # By Demographic - Religion write.table(prop.table(table(ces2022$religion_discuss, ces2022$genderid_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$race_ethnicity_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$politicalparty_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$religion_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$sexualorient_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$familyses_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$pub_priv), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$region), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$yearinschool), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$online_trich), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$religion_discuss, ces2022$student_interaction), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) # By Demographic - Sexual Orientation write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$genderid_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$race_ethnicity_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$politicalparty_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$religion_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$sexualorient_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$familyses_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$pub_priv), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$region), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$yearinschool), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$online_trich), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$sexualorientation_di, ces2022$student_interaction), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) # By Demographic - Gender write.table(prop.table(table(ces2022$gender_discuss, ces2022$genderid_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$race_ethnicity_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$politicalparty_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$religion_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$sexualorient_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$familyses_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$pub_priv), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$region), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$yearinschool), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$online_trich), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$gender_discuss, ces2022$student_interaction), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) # By Demographic - Noncontroversial write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$genderid_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$race_ethnicity_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$politicalparty_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$religion_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$sexualorient_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$familyses_demo), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$pub_priv), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$region), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$yearinschool), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$online_trich), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F) write.table(prop.table(table(ces2022$noncontroversial_dis, ces2022$student_interaction), margin = 2), "clipboard", sep = "\t", row.names = F, col.names = F)