Displaying 20 results from an estimated 10000 matches similar to: "boxplot with formula involving two-factor levels"
2011 Dec 09
1
Fixed! Thanks all:RE: scatterplot to boxplot translation?
Thanks to David and Jorge - both of your helpful suggestions got me to the desired endpoint. In case anyone else has this question: I boxplotted my y variable data, but did the "cut" operation on the x variable in order to conserve the order of the y data. I see another suggestion coming in from another user that basically says this.
So, my working line of code was:
boxplot(count$RPKM
2017 Sep 28
0
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,
2006 Apr 09
2
Boxplot using Formula
I am trying to use the formula interface for the boxplot.
Currently running R 2.2.1 on Windows XP.
The problem is that boxplot is displaying groups that are empty in the
plot.
The following example demonstrates what it is happening (though my actual
situation is a little more complicated):
> data<-data.frame(values=c(1:25),
2017 Sep 28
1
Boxplot, formula interface, and labels.
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
2017 Sep 28
3
Boxplot, formula interface, and labels.
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
2004 May 03
1
boxplot.formula with missing values (PR#6846)
If an array has missing values in different rows, plotting using the formul=
a=20
interface can produce errors. Example:
fake.data <- matrix(rep(-100:100, 4),
ncol =3D 4)
par(mfrow =3D c(1,2))
boxplot(fake.data ~ col(fake.data))
abline(h =3D 0, lty =3D 2)
boxplot(as.data.frame(fake.data))
abline(h =3D 0, lty =3D 2)
##### Add the missing data
fake.data[190:200, 1] <-
2007 Aug 30
1
boxplot will remember the factor levels
R-help,
I'm trying to do a simple box-and-whisker plot to some data.
The data are a subset of a large data frame
but when running the "boxplot" function on the subset data
all the factors are still present in the graph leaving a huge
empty space until the actuals factors are shown.
This produces a spurious box-and-whisker plot.
If the subset data are exported to another R session
2004 Aug 24
2
Boxplot across levels of a factor
Hello,
I have a data-frame in which one-column is a factor:
> str(data);
`data.frame': 194 obs. of 8 variables:
$ Type : Factor w/ 3 levels "Nuclear-Rec..",..: 1 2 2 2 2 2 2 2 2 2
...
$ Locus : num 0.000571 0.004000 0.001429 0.004857 0.007429 ...
And I'd like to make a boxplot of the data$Locus values, where each level of
the factor gets its own
2005 Jul 04
1
question about boxplot axis
Hi:
I have a question making side by side boxplot.
My response is numeric and I want to make a side by
side boxplot of it accroding to a factor vector. So,
there are several boxplots on the same plot. Each
boxplot is with respect to one level for a factor. The
levels of
the factor are some characters. When I make the plot,
the boxplots are arranged according to the alphabetic
order of the
2008 Apr 30
2
ordering a factor in boxplot output
I'm sure I'm missing something obvious in the documentation...
I'm generating a boxplot
boxplot(CleanValue~ApptCategory*ReportingCode,data=newfile)
where ApptCategory is a factor with possible values ("New","Established")
Problem is, the output orders those factors alphabetically, and I'd really
rather see New come first. I'm apparently confused by the
2008 Sep 16
1
boxplot labelling levels
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"))
2005 Jun 28
2
boxplot by factor (Package base version 2.1.1) ( PR#7976)
The issue is not with boxplot, but with split. boxplot.formula()
calls boxplot(split(split(mf[[response]], mf[-response]), ...),
but look at what split() returns when there are empty levels in
the factor:
> f <- factor(gl(3, 6), levels=1:5)
> y <- rnorm(f)
> split(y, f)
$"1"
[1] 0.4832124 1.1924811 0.3657797 1.7400198 0.5577356 0.9889520
$"2"
[1] -1.1296642
2007 Apr 09
3
plot log scale, axis original scale
I want to produce some boxplots and plot the logged values but have the
axis scale in the original, not-logged scale. It seeming like I have the
first few steps but I'm having trouble with the last. Here's what I'm
doing (which I got for the documentation for boxplot and axis). How do I
get the ticks to be labeled 2,5, and 9 of the original scale?
a<-c(1,2,3,4,5,6,7,8,9,10)
2009 Sep 02
1
Problems with Boxplot
Hello,
I have been having difficulty getting boxplot to give the output I want -
probably a result of the way I have been handling the data.
The data is arranged in columns: each date has two sets of data. The number
of data points varies with the date, so each column is of different length.
I want to get a series of boxplots with the date along the x-axis, with
alternating colors, so that it
2007 May 06
1
error using boxplot.stats (but boxplot works¿?)
Hi
The answer to this may be obvious, but it's got me floored.
I'm unable to get boxplot.stats to work for me!
My session looks something like this:
> ia=read.table('/tmp/prueba.csv', header=TRUE, sep=",")
> attach(ia)
> boxplot.stats(X8weeks~Orden)
Error in sort (na.last, decreasing, ...) :
argument 1 is not a vector
In addition: Warning
2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
Hello all,
I wrote a small function to add labels for outliers in a boxplot.
This function will only work on a simple boxplot/formula command (e.g:
something like boxplot(y~x)).
Code + example follows in this e-mail.
I'd be happy for any suggestions on how to improve this code, for example:
- Handle boxplot.matrix (which shouldn't be too hard to do)
- Handle cases of complex
2006 Apr 28
2
How to get a grid behind a boxplot
I am using R 2.2.1 on a Windows 2000 PC.
When I do a grid() after the boxplot
it overprints the boxplot:
> boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
> grid(nx=NA, ny=NULL)
>
if I try the panel.first
> boxplot(count ~ spray, data = InsectSprays, col = "lightgray",
+ panel.first=grid(nx=NA, ny=NULL))
>
I can see the grid flash
2012 Mar 12
2
How to create interrupted boxplot
Hello,
I have created two boxplots with following R code. There is one outlier in
B group.
The outlier is 33. But the all other data are between 0 to 4.
How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I
want keep the outlier in my boxplot.
I want my boxplot look like the second one, keep the outlier, and make an
interrupt of y-axis from 5 to 25.
Thanks,
Jianghong
2000 Feb 28
1
sub in boxplot doesn't do subtiles
R list-
Under Windows 2000 and r 99:
I wanted a subtitle in boxplot and tried:
> boxplot((AU[ROCK==2 & AU>-1]+0.1~iz),log="y",main="Boxplot of AU by 25 M elevations",sub="aa")
And I got:
Error in sort(x) : only vectors can be sorted
In addition: Warning messages:
1: is.na() applied to non-(list or vector) in: is.na(x)
2: is.na() applied to non-(list
2011 Nov 17
1
Small inconsistency with boxplot
Dear R-core team,
I think I found a small inconsistency in the boxplot function. I don't want to post it as a bug since I'm not sure this might be considered as one according to the FAQ --- and this is not a major problem. Don't hesitate to tell me if I'm wrong.
If you try to do a boxplot on a matrix and set the "at" argument to some vector different from 1:n, n is the