Skip to content
Back to formatted view

Raw Message

Message-ID: <CALRb-odDUm9MB_F6r=_-aNkb7imqyv2=DrR1OYR6g_zfOt1xMw@mail.gmail.com>
Date: 2017-09-28T17:45:12Z
From: Ed Siefker
Subject: Boxplot, formula interface, and labels.
In-Reply-To: <e28ce4d7374d4a3dad45b6482791a930@exch-2p-mbx-w2.ads.tamu.edu>

I knew I was making harder than it needed to be.  I see it now in ?boxplot
Thanks!

On Thu, Sep 28, 2017 at 12:30 PM, David L Carlson <dcarlson at tamu.edu> wrote:
> Just change the separator:
>
> data(Titanic)
> Titanic.df <- as.data.frame(Titanic)
> boxplot(Freq~Class*Sex, Titanic.df, cex.axis=.6, sep="\n")
>
> See attached .png.
>
> ----------------------------------------
> David L Carlson
> Department of Anthropology
> Texas A&M University
> College Station, TX 77843-4352
>
>
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ista Zahn
> Sent: Thursday, September 28, 2017 12:27 PM
> To: Ed Siefker <ebs15242 at gmail.com>
> Cc: r-help <r-help at r-project.org>
> Subject: Re: [R] Boxplot, formula interface, and labels.
>
> mybp <- boxplot(count ~ geno * tissue, data = mydata, plot = FALSE) mybp$names <- gsub("\\.", "\n", mybp$names)
> bxp(mybp)
>
> See ?boxplot for details.
>
> Best,
> Ista
>
> On Thu, Sep 28, 2017 at 12:40 PM, Ed Siefker <ebs15242 at gmail.com> wrote:
>> I have data I'd like to plot using the formula interface to boxplot.
>> I call boxplot like so:
>>
>> with(mydata, boxplot(count ~ geno * tissue))
>>
>> I get a boxplot with x axis labels like "wt.kidney".  I would like to
>> change the '.' to a newline.  Where is this separator configured?
>>
>> Thanks,
>> -Ed
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Titanic.png
Type: image/png
Size: 4773 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170928/a5b62dee/attachment.png>