Statistics One, Assignment One
Сен 13
Новости R, Statistics One, используем R, статистика 2 Comments
#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)
Сен 14, 2012 @ 07:13:02
This is very interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your excellent post. Also, I have shared your website in my social networks!
Сен 16, 2012 @ 23:38:02
Thank you for your assessment of my skills. Glad to see you among the readers of my blog.