search for: hivdat

Displaying 1 result from an estimated 1 matches for "hivdat".

Did you mean: hitdat
2010 Jun 09
1
counting across leves of factors
...ctor have 3levels) I have maybe 5000 observation. And i need to do table where is in every raw 1 of possible combination of this factors and the numbur how many time is this combination in my dataset. I wrote one code, but this is very slow and dumb. it looks like this: i<-0 for(i1 in levels(hivdat$pohl)){ a<-subset(hivdat,hivdat$pohl==i1) for(i2 in levels(a$vekF)){ b<-subset(a,a$vekF==i2) for(i3 in levels(b$ekstF)){ c<-subset(b,b$ekst==i3) for(i4 in levels(c$zam)){ d<-subset(c,c$zam==i4) for(i5 in levels(d$saman)){ e<-subset(d,d$saman==i5) for(i6 in levels(e$test)){ f<-sub...