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

From: Jonas Malmros <jonas.malmros_at_gmail.com>
Date: Mon, 17 Dec 2007 20:07:08 +0100

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

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 17 Dec 2007 - 19:10:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Dec 2007 - 20:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.