Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-12 Thread vimmster
Dear Mr. Holtman and especially dear Rui, thank you VERY much. You helped me a lot! I've just added the following: rsort <- ratios[order(ratios$vpNum),] Now the test subjects are arranged according to their vpNum. Thanks a lot again! -- View this message in context: http://r.789695.n4.nabb

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-11 Thread vimmster
Dear Rui, thank you VERY much. You helped me a lot! I've just added the following: rsort <- ratios[order(ratios$vpNum),] Now the test subjects are arranged according to their vpNum. Thanks a lot again! -- View this message in context: http://r.789695.n4.nabble.com/Extracting-arithmetic-mean

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-10 Thread vimmster
Dear Rui, 1) With test subject I mean each file (I have posted three similar files above (2, 50 and 1112), but each test subject has one exact file (which differs of course! --> 2, 50 an 1112 are the same file but I renamed it for the problem described ans solved above). In this file the vpNum is

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-10 Thread vimmster
Dear Rui, 1) With test subject I mean each file (I have posted three similar files above (2, 50 and 1112), but each test subject has one exact file (which differs of course! --> 2, 50 an 1112 are the same file but I renamed it for the problem described ans solved above). In this file the vpNum is

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-10 Thread vimmster
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 rati

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-10 Thread vimmster
Dear Mr. Holtman, but I cannot leave out the value and cannot change the values to 1200.995 manually (for each test subject with a reaction time > 1000 ms), because the first your lead to incomplete data and the latter would be too time-consuming. Dear Rui, here I have three files, which have ex

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread vimmster
Dear Mr. Barradas, your solution comes very close to what I want. But I have two questions left: First question: If "R" computes the mean for the reaction times of test subject 34 (the example I provided above), it says "310112.0", but if I use the "mean"-function in Excel it says "345.210". Ap

Re: [R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-09 Thread vimmster
Dear Mr. Holtman, thank you for your reply. I think I did say which mean I needed: "all of these reaction times per test subject. ", which means that I need a file with the mean of reaction times of each file / of each test subject (because file XYZ_34.txt is identical with subject 34's data). T

[R] Extracting arithmetic mean for specific values from multiple .txt-files

2012-07-08 Thread vimmster
Hello, I'm coming straight to the point: I have 65 .txt-Files named "XYZ_1.txt" to "XYZ_65.txt" (each number represents a test subject). I have to open them in Microsoft Excel to see the exact structure. In each of those .txt-files there are reaction time values (in milliseconds) from line 15,