Dear Murlidharan,
See argument 'names' in ?boxplot. In your case, it is:
boxplot(True.positives~splice,data=svm.perf, ylab="True
positives",names=levels(splice))
HTH,
Jorge
On Tue, Sep 16, 2008 at 4:09 PM, Nair, Murlidharan T <mnair@iusb.edu>
wrote:
> I want the levels to appear in the boxplot instead of 1 and 2. What do I
> need to do for that? Here is the dummy code.
>
>
> x<-runif(100,50,80)
> x1<-runif(100,70,80)
> True.positives<-c(x,x1)
>
splice<-factor(c(rep("Human.AA.200",100),rep("Human.AA.100",100)))
>
splice<-factor(splice,levels=c("Human.AA.200","Human.AA.100"))
> svm.perf<-as.data.frame(cbind(True.positives,splice))
> boxplot(True.positives~splice,data=svm.perf, ylab="True
positives")
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>
[[alternative HTML version deleted]]