Re: [R] ftables package, zero rows

2008-09-03 Thread Mikkel Grum
Does this help? a <- c(1,1,1,1,1,2,2,2,2,2) b <- c(4,5,6,5,4,7,8,9,8,7) c <- c("a","b","c","d","a","b","b","a","d","d") A <- cbind(a,b,c) test <- ftable(a,b,c) test.df <- data.frame(test) test.df[test.df$Freq != 0, ] Doesn't quite give the layout you seem to want, but effectively removes the ze

Re: [R] ftables package, zero rows

2008-09-02 Thread Marc Flockerzi
7 0 1 0 1 > 8 0 1 0 1 > 9 1 0 0 0 best regards marc > -Ursprüngliche Nachricht- > Von: "Henrique Dallazuanna" <[EMAIL PROTECTED]> > Gesendet: 02.09.08 18:33:53 > An: "Marc Flockerzi" <[EMAIL PROTECTED]> > CC: r-help@r-project.org

Re: [R] ftables package, zero rows

2008-09-02 Thread Henrique Dallazuanna
Try this: test[test == 0] <- '' test On Tue, Sep 2, 2008 at 1:03 PM, Marc Flockerzi <[EMAIL PROTECTED]>wrote: > dear all, > > i'm just about to do some straightforward contingency tables using ftables > (and ctab() for percents). > > the problem: > factor "a" are regions, factor "b" are subregio

[R] ftables package, zero rows

2008-09-02 Thread Marc Flockerzi
dear all, i'm just about to do some straightforward contingency tables using ftables (and ctab() for percents). the problem: factor "a" are regions, factor "b" are subregions. every region "a" consists of some subregions "b", but obviously not every subregion "b" is part of every region "a". i