Arithmetic Test R Code (part 3)

> newmath2.set.types
function ()
{# set variables in newmath2 to proper types
#
newmath2$year< <-as.integer(newmath2$year)
newmath2$month< <-as.integer(newmath2$month)
newmath2$day< <-as.integer(newmath2$day)
newmath2$hour< <-as.integer(newmath2$hour)
newmath2$minute< <-as.integer(newmath2$minute)
newmath2$second< <-as.integer(newmath2$second)
newmath2$condition< <-as.character(newmath2$condition)
newmath2$trial< <-as.integer(newmath2$trial)
newmath2$wait.msec< <-as.integer(as.character(newmath2$wait.msec))
newmath2$problem< <-as.character(newmath2$problem)
newmath2$answer.msec< <-as.integer(newmath2$answer.msec)
newmath2$actual.answer< <-as.integer(newmath2$actual.answer)
newmath2$correct< <-as.logical(newmath2$correct)
newmath2$include< <-as.logical(newmath2$include)
newmath2$note< <-as.character(newmath2$note)
}
> save.ws
function ()
{
invisible()
save.image(“C:/Documents and Settings/Seth/My Documents/omega-3/tracking.RData”)
cat(“tracking workspace saved”,as.character(Sys.time()),”\n”)
}

5 thoughts on “Arithmetic Test R Code (part 3)

  1. Seth, I plan on installing R and playing with this stuff in about two weeks (I won’t have time until then). I’m fairly tech-savvy, but is there anything else that is non-obvious that I will need to know in order to avoid potential headaches and cursing when I go to implement this stuff? I have a Windows XP machine.

    Thanks for posting the code.

  2. Alex, the crucial function runs on Windows but not other operating systems. So at the most basic level you are okay. However, to solve problems that come up I think you will need a basic knowledge of R. And the data analysis requires a bunch of data (e.g., 100 trials) to work properly. In other words: this will be difficult for a non-R user to use. You will need to have basic R proficiency AND study the code carefully to get things to work.

  3. Seth,

    Thanks for posting thigs. I have most of this working in R, but I get the error message could not find function “newmath2.problem”.

    It seems like there should be functions defined for newmath2.problem() and newmath2.feedback(). If so, could you post them?

    Thanks,

  4. Found the code. A link to the part 4 of the code from this page would help. I thought this was then end of the code postings.

Leave a Reply

Your email address will not be published. Required fields are marked *