[R] Cannot grasp how to apply "by" here...

Jonas Malmros jonas.malmros at gmail.com
Mon Dec 17 20:07:08 CET 2007


Dear Charilaos,
Thanks, I see what you mean, but I just simplified the real code here
and I made a mistake by putting +2, it is +1. :-)

JM


 On Dec 17, 2007 8:02 PM, Charilaos Skiadas <cskiadas at gmail.com> wrote:
 > On Dec 17, 2007, at 1:47 PM, Jonas Malmros wrote:
 >
 > > factor.names <- c("Factor1", "Factor2")
 > > factor.pvalue <- c("SigF1", "SigF2")
 > > results <- numeric()
 > > vector <- matrix(0, ncol=(length(factor.names)*2+2), nrow=1)
 > > colnames(vector) <- c("No.obs", factor.names, factor.pvalue)
 >
> > If you look at "vector" you'll see it has column dimension 6. You are
> > trying to assign to it 5 colnames, which is not going to work. That's
> > exactly what the error tells you, and it happens on the line above,
> > the rest of your code is irrelevant to it.
> >
> > Haris Skiadas
> > Department of Mathematics and Computer Science
> > Hanover College
> >
> >
> >
> >
> >
>
>
>
>
> --
> Jonas Malmros
> Stockholm University
> Stockholm, Sweden
>



-- 
Jonas Malmros
Stockholm University
Stockholm, Sweden



More information about the R-help mailing list