[R] [ ] within [ ]
Brian P. Flaherty
bxf4 at psu.edu
Thu Jun 15 06:17:10 CEST 2000
Hello,
w is a matrix of responses to categorical variables. So for example,
let the first column of w be a dichotomous variable taking values 1 or
2. I then have an array, arr, which has the number of response
categories as its first dimension. I want to use a person's response
to the item to select the `row' in the first dimension of the array.
tot_c(0)
for (i in 1:n){
tot_tot+arr[w[i,1],1,1]
}
I just tried it in S-Plus and it worked. Should it work in R or is
this is a language difference? Thanks for your time.
Brian Flaherty
--
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list