Question: plotting a ca.
0
gravatar for Aaral Singh
7.4 years ago by
Aaral Singh10
Aaral Singh10 wrote:
Hello. I have followed conversation re:plotting a ca. Have try with data. I receive this error. > plotCA(codonCA, rowFac=fac,pch=c(18,20), cols=c("red", "blue"), plotrowLabels=TRUE) Error in fac2char(rowFac, pch) : Number does not equal to number of factor levels I see error in function: fac2char<-function(fac, newLabels) { > cLab<- class(newLabels) > if (!length(levels(fac))==length(__newLabels)) stop("Number > does not equal to number of factor levels") May you explain what this means? Thank Aaral [[alternative HTML version deleted]]
• 321 views
ADD COMMENTlink modified 7.4 years ago by StephK70 • written 7.4 years ago by Aaral Singh10
Answer: plotting a ca.
0
gravatar for StephK
7.4 years ago by
StephK70
StephK70 wrote:
I can't help you yet because i am only learning it now myself, but have you seen the intro pdf on the made4 page? http://www.bioinf.ucd.ie/people/aedin/R/ On Sat, Mar 10, 2012 at 5:08 PM, Aaral Singh <aaral.singh@gmail.com> wrote: > Hello. I have followed conversation re:plotting a ca. > > Have try with data. > > I receive this error. > > > > plotCA(codonCA, rowFac=fac,pch=c(18,20), cols=c("red", "blue"), > plotrowLabels=TRUE) > Error in fac2char(rowFac, pch) : > Number does not equal to number of factor levels > > I see error in function: > > fac2char<-function(fac, newLabels) { > > cLab<- class(newLabels) > > if (!length(levels(fac))==length(__newLabels)) stop("Number > > does not equal to number of factor levels") > > May you explain what this means? > > Thank > Aaral > > [[alternative HTML version deleted]]
ADD COMMENTlink written 7.4 years ago by StephK70
Hmm. I didn't have this error on my smaller dataset, but i get the same thing when i use a bigger dataset. So far, I know all i know is what the error tells me, it has something to do with the way i am reading in the "interesting" nodes that i want to highlight. I have been looking at this page: http://stat.ethz.ch/R-manual/R-devel/library/base/html/levels.html and this page: http://www.ats.ucla.edu/stat/R/modules/factor_variables.html i'll let you know if i sort it out! Aoife On Sat, Mar 10, 2012 at 8:12 PM, aoife doherty <aoife.m.doherty@gmail.com>wrote: > I can't help you yet because i am only learning it now myself, but have > you seen the intro pdf on the made4 page? > > http://www.bioinf.ucd.ie/people/aedin/R/ > > > > On Sat, Mar 10, 2012 at 5:08 PM, Aaral Singh <aaral.singh@gmail.com>wrote: > >> Hello. I have followed conversation re:plotting a ca. >> >> Have try with data. >> >> I receive this error. >> >> >> > plotCA(codonCA, rowFac=fac,pch=c(18,20), cols=c("red", "blue"), >> plotrowLabels=TRUE) >> Error in fac2char(rowFac, pch) : >> Number does not equal to number of factor levels >> >> I see error in function: >> >> fac2char<-function(fac, newLabels) { >> > cLab<- class(newLabels) >> > if (!length(levels(fac))==length(__newLabels)) stop("Number >> > does not equal to number of factor levels") >> >> May you explain what this means? >> >> Thank >> Aaral >> >> > [[alternative HTML version deleted]]
ADD REPLYlink written 7.4 years ago by StephK70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 186 users visited in the last hour