Displaying 1 result from an estimated 1 matches for "colvf".
Did you mean:
colv
2012 Mar 15
2
summing "transfers"
...h "MT-902". I want to know how many transfers there are between MT-802 and MT-901. That is, when one of them is VEHx and the other is VEHx+1 or VEHx-1
E.g. {VEH1 = MT-802 AND VEH2 = MT-901 } plus {VEH2 = MT-901 AND VEH3 = MT-802} plus all the other combinations....
Someone suggested:
colvf <- 81 # column of first VEH in indat
colvl <- 88 # column of last VEH in indat
tapply( rep( SubOre$expwgt, colvl-colvf ),
list( as.matrix(SubOre[ ,colvf:(colvl-1)]),
as.matrix(SubOre[ ,(colvf+1):colvl]) ), sum)
but there are too many rows and columns to print.
Rob...