Skip to content

Instantly share code, notes, and snippets.

View ctesta01's full-sized avatar
🌱

Christian Testa ctesta01

🌱
View GitHub Profile
@ctesta01
ctesta01 / mc_single_answer_results.md
Last active July 21, 2016 14:32
QualtricsTools: How MCSA Questions Work

This page was last updated on July 21st, 2016.

The commit this reflects the code from is: 82af5

Multiple Choice Single Answer

Line 35, R/results_generation.R is where we begin.

mc_single_answer_results <- function(question) {
@ctesta01
ctesta01 / mc_multiple_answer_results.md
Created July 21, 2016 14:44
QualtricsTools: How MCMA Questions Work

This page was last updated on July 21st, 2016.

The commit this reflects the code from is: 82af5

Multiple Choice Multiple Answer

Line 92, R/results_generation.R is where we begin.

mc_multiple_answer_results <- function(question) {
@ctesta01
ctesta01 / matrix_single_answer_results.md
Last active July 21, 2016 16:40
QualtricsTools: How Matrix SA Questions Work

This page was last updated on July 21st, 2016.

The commit this reflects the code from is: 82af5

Matrix Single Answer

Matrix questions use "choice" to indicate a horizontal question component and "answer" to indicate a vertical option. For example, if a matrix questions options were formatted like the following table, the "choices" would be the list of "apple", "orange" and "banana". Similarly, the

@ctesta01
ctesta01 / comment_coding.R
Last active December 8, 2016 21:02
comment coding with qualtricstools
library(readxl)
#' Turn a Directory into a list of Coded Comment Data Frames (unprocessed)
directory_get_coded_comment_sheets <- function(directory) {
# ask for directory if not provided
if (missing(directory)) directory <- choose.dir()
# we only want to look at Excel or CSV files in the given directory
files_list <- list.files(path=directory, full.names=TRUE)
files_list <- files_list[lapply(files_list, function(x) grepl("*.xlsx$|*.xls$|*.csv$", x)) == TRUE]
@ctesta01
ctesta01 / splitting_fletcher_text_appendices.R
Last active December 8, 2016 21:03
splitting fletcher comments
library(QualtricsTools)
source("Q:/Student Work/Emma's Student Work/Report Generation/Comment Coding/comment-coding.R")
get_setup(
qsf_path = "Q:/Student Work/Emma's Student Work/Report Generation/Comment Coding/examples/fletcher/Fletcher_Continuing_and_Exiting_Student_Survey_2016.qsf",
csv_path = "Q:/Student Work/Emma's Student Work/Report Generation/Comment Coding/examples/fletcher/Fletcher_Continuing_and_Exiting_Student_Survey_2016.csv",
headerrows=2)
@ctesta01
ctesta01 / splitting_grad_text_appendices.R
Created December 8, 2016 21:03
splitting grad admissions text appendices
library(QualtricsTools)
source("Q:/Student Work/Emma's Student Work/Report Generation/Comment Coding/comment-coding.R")
get_setup(
qsf_path = "Q:/Student Work/Emma's Student Work/Report Generation/Comment Coding/examples/grad admissions/grad_admissions.qsf",
csv_path = "Q:/Student Work/Emma's Student Work/Report Generation/Comment Coding/examples/grad admissions/grad_admissions.csv",
headerrows=3)
@ctesta01
ctesta01 / nonlinear_review.md
Created December 15, 2016 19:31
Review for Nonlinear Dynamics

Topics to Review

Exam 1

  • Exam 1
    • Exponential Growth
    • Qualitative Shape
    • Existence and Uniqueness of Solutions
    • Fixed Point Stability
    • Sudden Population Collapse
  • Homework 1
@ctesta01
ctesta01 / use_comment_coding.R
Last active March 17, 2017 15:14
Using comment_coding.R
library(QualtricsTools)
source("comment_coding.R")
get_setup(headerrows=2)
comments_dir <- "C:/path/to/coded_comments/here/"
coded_comments <- directory_coded_comments(comments_dir)
blocks <- insert_coded_comments(blocks, original_first_rows, coded_comments)
questions <- questions_from_blocks(blocks)
flow <- flow_from_survey(survey)
text_appendices <- text_appendices_table(blocks, original_first_rows, flow)
html_2_pandoc(html = c(blocks_header_to_html(blocks), text_appendices), file_name = "coded_text_appendices.docx", format = "docx", output_dir = "C:/output/directory/here/")
@ctesta01
ctesta01 / math-reading.md
Last active April 17, 2017 22:21
Recommended Mathematics Reading

Recommendations

This is a list of writings about mathematics that I think are accessible to a mathematically interested audience, as well as quite worth the read. I have read many of these multiple times, and will be quite happy if somebody finds something they enjoy on this list.

General Mathematics

# Let's try and find out what parameters are undocumented in my package QualtricsTools.
# July 2017
# Christian Testa
# This uses some internals (such as parse_rd and .Rd_get_argument_names) from the tools package
# with the .Rd files generated by Roxygen with the args function to get arguments of functions
# loaded from the QualtricsTools in order to approximately tell which parameters are undocumented
# in the package.
# The script below seems to be prone to false-positives where the documentation for a parameter does