#Statistics One, Assignment One
#Read data, plot histograms, get descriptive
library(psych)
#Read the data into a dataframe called working_memory
working_memory< -read.table("DAA.01.TXT", header=T)
#What type of object is working_memory?
class(working_memory)
#List the names of the variables in the dataframe called working memory.
names(working_memory)
#Create subset
groupdes <- subset(working_memory, subset=(cond=="des"))
groupaer <- subset(working_memory, subset=(cond=="aer"))
#Print 8 histograms on one page
layout(matrix(c(1,2,3,4,5,6,7,8), 2, 4, byrow=TRUE))
#Plot histograms
hist(groupdes$pre.wm.s, xlab = "PRE WM spatial DES")
hist(groupdes$post.wm.s, xlab = "POST WM spatial DES")
hist(groupaer$pre.wm.s, xlab = "PRE WM spatial AER")
hist(groupaer$post.wm.s, xlab = "POST WM spatial AER")
hist(groupdes$pre.wm.v, xlab = "PRE WM verbal DES")
hist(groupdes$post.wm.v, xlab = "POST WM verbal DES")
hist(groupaer$pre.wm.v, xlab = "PRE WM verbal AER")
hist(groupaer$post.wm.v, xlab = "POST WM verbal AER")
#Descriptive statistics for the variables in the dataframe called working_memory
describe(groupdes)
describe(groupaer)