Hello,
I'm glad it help.
As for this second question, you should explain yourself better.
1. What is a test subject, which column records its id? vpNum?
2. You say "divided per trials or trialCount". Does this mean per trial
number (example: divide by 1, by 2, by 3, etc, by 149) or per number of
trials (149 in the previous example)
3. 'correct' now seems to be categorical. Divide WHAT by trial or
trialCount?
Hint: post a small data example with three or four subjects and the
wanted output.
Rui Barradas
Em 10-07-2012 18:06, vimmster escreveu:
Dear Rui,
thank you very much.
Your solution works perfectly.
One last question:
I need to write a function, with ONE value (here: a ratio) for the correct
reactions divided per trials or trialCount, respectively, FOR EACH test
subject.
"/" means "divided by" in the following.
I need the ratio correct (reactions)/trial or correct
(reactions)/trialCount, respectively (because trial and trialCount are the
same WITHIN test SUBJECTS; BUT they differ in length between BETWEEN test
SUBJECTS!).
It would be very helpful, if I had a data frame in the end in R, with one
column for
"trialCount"/"trial", one column for "correct reactions"(= 1) AND (more
importantly) one column for "correct (= 1) answers / trialCount".
legend (just as additional information) for the variable "correct":
1 = correct reaction
2 = false reaction
3 = reaction too slow
4 = reaction too fast
5 = more than one button pressed
6 = no reaction within RT window
I would be very thankful for an answer!
Sorry for the questions, but I am doing this for the first time!
Kind regards
--
View this message in context:
http://r.789695.n4.nabble.com/Extracting-arithmetic-mean-for-specific-values-from-multiple-txt-files-tp4635809p4636020.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.