[R] Beginner question: select cases

2006-09-25 Thread Peter Wolkerstorfer - CURE
Hello all, I hope i chose the right list as my question is a beginner-question. I have a data set with 3 colums London, Rome and Vienna - the location is presented through a 1 like this: London RomeVienna q1 0 0 1 4 0 1 0

[R] Beginner Loop Question with dynamic variable names

2006-09-25 Thread Peter Wolkerstorfer - CURE
Dear all, I have another small scripting-beginner problem which you hopefully can help: I compute new variables with: # Question 1 results$q1 - with(results, q1_1*1+ q1_2*2+ q1_3*3+ q1_4*4+ q1_5*5) # Question 2 results$q2 - with(results, q2_1*1+ q2_2*2+ q2_3*3+ q2_4*4+ q2_5*5) # Question 3