Created
May 18, 2016 15:46
-
-
Save aaroncharlton/69277b6794e78a6af22c8d7042d86933 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setwd("~/Research/PPAuthenticity/studies/Study1") | |
library(dplyr) | |
filter <- dplyr::filter | |
select <- dplyr::select | |
qualtrics <- read.csv("PPAuthenticity2SPAPR15.csv", stringsAsFactors = FALSE) %>% | |
filter(grepl("^95", ID)) %>% # remove responses without student ID | |
rename(adskep_2 = adskep_10, | |
adskep_3 = adskep_11, | |
adskep_4 = adskep_12, | |
adskep_5 = adskep_13, | |
adskep_6 = Q28_14, | |
adskep_7 = Q28_15, | |
adskep_8 = Q28_16, | |
adskep_9 = Q28_17, | |
Out_not_authentic = Symbol_5) %>% | |
select(matches("cont|symbol|cred|integ|out|adskep|id|qpq")) %>% | |
mutate_each(funs(as.numeric), -ID) %>% | |
mutate(authenticity = rowMeans(dplyr::select(.,matches("cont|Symbol|cred|Integ")))) %>% | |
mutate(condition = factor(.$qpq, labels=c("qpq","bonus"), exclude=NULL)) %>% | |
select(-qpq) | |
demos <- read.csv("Spring 2015 Demos UPPER 3-8.csv", stringsAsFactors = FALSE) %>% | |
distinct(ID) | |
alldata <- left_join(qualtrics,demos, by="ID") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment