[R] automation question
RRRRRRRRRR!
cwalter at usgs.gov
Fri Jul 31 21:30:37 CEST 2009
I have columns in two tables that need to be compared in order to get a
statistic. The function calculating the statistic is somers2. Here are the
two columns I must calculate, row by row.
name1 name2
1 Pred_pres_a_indpdt[,3,,] population[,23]
2 Pred_pres_b_indpdt[,3,,] population[,24]
3 Pred_pres_c_indpdt[,3,,] population[,25]
4 Pred_pres_d_indpdt[,3,,] population[,26]
5 Pred_pres_e_indpdt[,3,,] population[,27]
6 Pred_pres_f_indpdt[,3,,] population[,28]
7 Pred_pres_a_indpdt[,4,,] population[,23]
8 Pred_pres_b_indpdt[,4,,] population[,24]
9 Pred_pres_c_indpdt[,4,,] population[,25]
10 Pred_pres_d_indpdt[,4,,] population[,26]
11 Pred_pres_e_indpdt[,4,,] population[,27]
12 Pred_pres_f_indpdt[,4,,] population[,28]
13 Pred_pres_a_indpdt[,5,,] population[,23]
14 Pred_pres_b_indpdt[,5,,] population[,24]
15 Pred_pres_c_indpdt[,5,,] population[,25]
16 Pred_pres_d_indpdt[,5,,] population[,26]
17 Pred_pres_e_indpdt[,5,,] population[,27]
18 Pred_pres_f_indpdt[,5,,] population[,28]
19 Pred_pres_a_indpdt[,8,,] population[,23]
20 Pred_pres_b_indpdt[,8,,] population[,24]
21 Pred_pres_c_indpdt[,8,,] population[,25]
22 Pred_pres_d_indpdt[,8,,] population[,26]
23 Pred_pres_e_indpdt[,8,,] population[,27]
24 Pred_pres_f_indpdt[,8,,] population[,28]
the somers2 function works like this:
somers2(x, y)
for example: somers2(Pred_pres_a_indpdt[,3,,], population[,23])
so somers2 is calculated for each row, with column 1 as x, column 2 as y.
Is there anyway to automate this?
-R
--
View this message in context: http://www.nabble.com/automation-question-tp24761918p24761918.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list