From e3925ec97ccc5cf127c06fb98f4588fc2d240a07 Mon Sep 17 00:00:00 2001 From: "Andy Zimolzak (2018 mbp)" Date: Fri, 7 Feb 2020 13:47:42 -0600 Subject: [PATCH] Untabify. --- likert.R | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/likert.R b/likert.R index 3ef4b6c..afa4e7f 100644 --- a/likert.R +++ b/likert.R @@ -27,11 +27,11 @@ less_spiky = likert_beta(SAMP_SIZE, 1, 0.5) # Group: A B samp_names = c("centered", "r_tail", # question 1 - "l_tail", "concave", # question 2 - "more_concave", "ramp", # 3 - "gentle_ramp", "ramp2", # 4 - "moderate_ramp", "very_spiky", # 5 - "less_spiky", "moderate_ramp") # 6 + "l_tail", "concave", # question 2 + "more_concave", "ramp", # 3 + "gentle_ramp", "ramp2", # 4 + "moderate_ramp", "very_spiky", # 5 + "less_spiky", "moderate_ramp") # 6 # Q1 group A @@ -66,16 +66,16 @@ q7a = round(SAMP_SIZE / sum(q7a) * q7a) # normalize q7b = round(SAMP_SIZE / sum(q7b) * q7b) for (s in 0:MAX_LIKERT){ - replicates_a = q7a[s+1] - replicates_b = q7b[s+1] - for (i in 1:replicates_a){ - X = rbind(X, data.frame(score = s, pop_name = "sketched", - group = "A", question_num = 7)) - } - for (i in 1:replicates_b){ - X = rbind(X, data.frame(score = s, pop_name = "sketched", - group = "B", question_num = 7)) - } + replicates_a = q7a[s+1] + replicates_b = q7b[s+1] + for (i in 1:replicates_a){ + X = rbind(X, data.frame(score = s, pop_name = "sketched", + group = "A", question_num = 7)) + } + for (i in 1:replicates_b){ + X = rbind(X, data.frame(score = s, pop_name = "sketched", + group = "B", question_num = 7)) + } } @@ -97,7 +97,7 @@ for (q in 1:7){ # https://www.rdocumentation.org/packages/DescTools/versions/0.99.32/topics/CochranArmitageTest temp_frame = data.frame(question = q, wilcoxon_p = wt$p.value, - ttest_p = tt$p.value, catt_p = catt$p.value, chi_p = cs$p.value) + ttest_p = tt$p.value, catt_p = catt$p.value, chi_p = cs$p.value) Results= rbind(Results, temp_frame) }