Instantly share code, notes, and snippets.

Embed
What would you like to do?
Typical method for tidying data from one of my jsPsych experiments hosted on Google App Engine
# Script for tidying data pulled from Google App Engine. Typically the raw format
# has a "content" field, and each entry in it is a text string describing the
# complete data set from one person in CSV format.
library(tidyverse)
my_data <- read_csv("results.csv") %>%
pull("content") %>%
map_dfr(read_csv, col_types = cols(.default = "c")) %>%
write_csv("tidy_results.csv")
# Notes:
# - the script assumes that results.csv is in the working directory
# - the script doesn't know what's in each field, so it treats everything as text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment