search for: mrg2drop

Displaying 2 results from an estimated 2 matches for "mrg2drop".

2003 Feb 28
0
(multiway) percentage tables
..."row.vars"))) row.vars<-1:nrowvar col.vars<-(1:length(names(attr(tbl,"col.vars"))))+nrowvar tbl<-as.table(tbl) } # marginals to exclude assuming first factor is the row vaariable, # second factor is the column variable # is overridden by row.vars or col.vars mrg2drop<-0 if (type=="column") {mrg2drop<-1} if (type=="row") {mrg2drop<-2} if (type=="total" && length(dim(tbl)) > 1) {mrg2drop<-c(1,2)} # use row.vars and col.vars to determine the # marginals to use when calculating percentages # start by tran...
2003 Mar 06
0
modifying ftable to allow percentages (wishlist) (PR#2606)
...;, "row", "column", "total","gtotal") could be added to ftable.default. Prior to the "y <- aperm" near the end of ftable, the following lines would be added: pcnt<-match.arg(pcnt) if (pcnt!="n") { if (pcnt=="row") {mrg2drop<-col.vars[length(col.vars)]} if (pcnt=="column") {mrg2drop<-row.vars[length(row.vars)]} if (pcnt=="total") {mrg2drop<-c(col.vars[length(col.vars)],row.vars[length(row.vars)])} if (pcnt=="gtotal") {mrg2drop<-0} x<-prop.table(x,i[-mrg2drop...