search for: thomasthis

Displaying 2 results from an estimated 2 matches for "thomasthis".

2011 Dec 12
3
For loop indicies
...o run a for loop with an index going from 0 to 499 but the following seems to miss out the first value: C <- 499 for (i in 0:C) The alternative is: C <- 500 for (i in 1:C) { #Then every time I use i, I replace it with i-1 } Is this a good way to do it or is tere a better way? Thank you, ThomasThis message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any atta...
2011 Jul 16
1
Max within groups
...t it quite right. I have a matrix like this: 1, 16 1, 23 1, 21 1, 6 1, 25 2, 4 2, 17 2, 45 2, 11 2, 20 and I'd like to find the max value in Column 2 (or the index to the max value) grouped by the first column. So the max for Group 1, the max for Group 2 etc. Any help would be appreciated. ThomasThis message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any atta...