[R] Questions on formula in princomp
Sasha Pustota
popgen at gmail.com
Sat Apr 15 00:34:43 CEST 2006
Ok, that was just my wishful thinking.
Is there a way to plot repeated labels that identify groups, e.g.
factor(c(rep("s",50),rep("c",50),rep("v",50)))
instead of 1--150 row indices, using something like
biplot(princomp(lir)) ?
Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> Just use model.frame to examine what is passed:
>
> > ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
> > lir <- data.frame(log(ir))
> > names(lir) <- c("a","b","c","d")
> > lir[1,1] <- NA
> > mf <- model.frame(~., lir,na.action=na.omit)
> > head(mf)
> a b c d
> 2 1.589235 1.098612 0.3364722 -1.6094379
> > head(lir)
> a b c d
> 1 NA 1.252763 0.3364722 -1.6094379
More information about the R-help
mailing list