plotting a ca.
1
0
Entering edit mode
Aaral Singh ▴ 10
@aaral-singh-5155
Last seen 9.6 years ago
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]]
• 807 views
ADD COMMENT
0
Entering edit mode
StephK ▴ 70
@stephk-5152
Last seen 7.4 years ago
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 COMMENT
0
Entering edit mode
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 REPLY

Login before adding your answer.

Traffic: 734 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6