Hallo, I just made a boxplot with the following command: boxplot(vsnrg$M~col(vsnrg$M)) When I now look at the plot. On the x-axis I just find numbers 1-6 because I have 6 datasets plotted. Now I want to add there the corresponding names which can be found in colnames(qrg). How can I realize this the online help does not help me. Thanks Corinna
Try this: boxplot(vsnrg$M~col(vsnrg$M), xaxt="n") axis(1, at=1:length(colnames(qrg)), labels=colnames(qrg)) On 24/01/2008, Schmitt, Corinna <Corinna.Schmitt at igb.fraunhofer.de> wrote:> Hallo, > > I just made a boxplot with the following command: > boxplot(vsnrg$M~col(vsnrg$M)) > > When I now look at the plot. On the x-axis I just find numbers 1-6 > because I have 6 datasets plotted. Now I want to add there the > corresponding names which can be found in colnames(qrg). How can I > realize this the online help does not help me. > > Thanks Corinna > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
round(12.01,1) will give the answer 12, not 12.0 or even 12. To make a table look nice, I need to display the trailing zero so that just as round(12.05,1) yields 12.1, round(12.01) yields 12.0. I cannot find an answer in print() or format() or options(). Any suggestions would be appreciated. Joseph F. Lucke, PhD Biostatistician Center for Clinical Research and Evidence-based Medicine University of Texas Medical School at Houston Email: Joseph.F.Lucke at uth.tmc.edu
formatC(round(12.01), digits=1, format="f") -Christos> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Lucke, Joseph F > Sent: Thursday, January 24, 2008 4:37 PM > To: r-help at r-project.org > Subject: [R] Displaying trailing zeroes > > round(12.01,1) will give the answer 12, not 12.0 or even 12. > To make a table look nice, I need to display the trailing > zero so that just as > round(12.05,1) yields 12.1, round(12.01) yields 12.0. I > cannot find an answer in print() or format() or options(). > Any suggestions would be appreciated. > Joseph F. Lucke, PhD > Biostatistician > Center for Clinical Research and Evidence-based Medicine > University of Texas Medical School at Houston > Email: Joseph.F.Lucke at uth.tmc.edu > > > ______________________________________________ > 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. > >