Displaying 20 results from an estimated 10000 matches similar to: "Boxplot using Formula"
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
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,
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] <-
2016 Apr 29
1
boxplot with formula involving two-factor levels
Hi,
I noticed two seemingly equivalent call to boxplot will give different plots (in the way how the combined factor levels are arranged on the x-axis):
x = factor(rep(c("a", "b", "c"), each=2));
y = rep(factor(c("one", "two")), each=3);
r = 3;
n = r * 6;
x = rep(x, 3);
y = rep(y, 3);
z = rnorm(n);
par(mfrow=c(2,1));
## The following two
2008 Feb 04
7
adding the mean and standard deviation to boxplots
Dear list,
How can I add the mean and standard deviation to each of the boxplots using the example provided in the boxplot function?
boxplot(len ~ dose, data = ToothGrowth,
boxwex = 0.25, at = 1:3 - 0.2,
subset = supp == "VC", col = "yellow",
main = "Guinea Pigs' Tooth Growth",
xlab = "Vitamin C dose mg",
2009 Mar 25
1
boxplot in subgroups
Hi,
I have data that looks like this:
ASA1 ASA2 C1_C2
C M 9.0225
S S 2.4315
M C 3.4894
M S 4.5282
C M 1.3183
C S 1.3735
S C 1.0488
S M 7.948
M C 4.5827
I need to plot Boxplots for a given ASA1 (either C,S, or M) with
respect to C1_C2. However, instead of one boxplot I want to plot
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
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
2010 Nov 29
1
surpressing tickmarks / labels x-as for two sets of boxplot (plotted as stacked boxplots)
Hello,
I am trying to plot two sets of boxplots together. These are estimates of two
experiments and?seven?factors.
The results of the two experiments I want to plot as boxplots stacked to each
other.
Therefore I plot first the results of the first experiment; and next with the
add option the second set of boxplots.
The boxplots are plotted at 'at = 1:7 - 0.15 for the first experiment and
2008 Aug 01
2
boxplot help
hi
I have list of matrix of lenggth 61 containg the mean values..I want to make
a boxplot for each of the matrix.
I used a for loop but i cant figure out the way to save in the boxplots
> all.the.mean
[[1]]
mean
0.5
o.6
0.8
[[2]]
0.6
0.6
0.9
now i want the boxplot for each of the matrix in a seperate window.my code
for(i in 1:length(all.the.mean)
{
windows()
boxplot(all.the.mean[[i]]
}
this
2003 Apr 23
1
Text on a boxplot graph
Hi all,
Could anybody help me figure out how to write text on a boxplot. I have to
plot 9 boxplots side by side on a single graph. On the x-axis I write numeric
values with the 'names' argument but I'd like to add one label (character
value) in the middle of each box. I know how to use the text() function for
regular y~x plots but in this particular case, I'm kinda lost...
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
2008 Sep 12
2
Again, about boxplot
Thank you for your guys reply for my previous question. But I got one more
question about the boxplot. With the code in the R-help:
boxplot(len ~ dose, data = ToothGrowth,
boxwex = 0.25, at = 1:3 - 0.2,
subset = supp == "VC", col = "yellow",
main = "Guinea Pigs' Tooth Growth",
xlab = "Vitamin C dose mg",
ylab =
2011 Aug 18
1
Specifying data point locations on x-axis using boxplot() and points()
Hi all,
I would like to ask a question with regard to R graphics. I am currently
trying to add data points in boxplots using points(). In my script, I add
up boxplots three times using add=TRUE. I use points() every time I add
boxplots, and I see data points. However, I see all data points are clustered
at three specific points on x-axis; the locations of the data points
are not overlapping with
2004 Sep 12
2
boxplot() from list
I have a list containing 48 objects (each with 30 rows and 4 columns, all
numeric), and wish to produce 4 boxplot series (with 48 plots in each) ,
one for each column of each object.
Basically I want a boxplot from boxplot(mylist[[]][,i])
for i in 1:4. It seems that I can create a boxplot of length 48 from the
entire list, but I don't seem able to subscript to return 4 boxplots from
the list
2010 Feb 12
1
Need help on boxplot panel chart
Hi there:
I am new to R and creating a boxplot panel chart to show a test result.
I have four output variables (OV1, OV2, OV3, OV4) reflecting effects of the
variation of three status parameters (SP1, SP2, SP3) on them at three
different locations (Loc1, Loc2, Loc3). My plan is that displaying ONE OV
change with ONE SP over three Loc in each boxplot (i.e., Loc is X axis and
OV value is Y axis).
2007 Jun 16
1
Lines connecting the boxes in a boxplot
Hello,
I'm currently using a boxplot to visualize data for three different
models. As I have three models, I'm plotting three parallel boxplots
for each factor.
This works fine - what I need now is a line connecting the medians of
each boxplot of each model. I want to do this in order to visualize
the trend that one of the models exhibit. Basically, I want to plot a
curve for each model
2012 Nov 16
2
Boxplot in R
How to calculate the boxplots R? This question arises because we are building
manually boxplots, we consulted various literature sources for calculations
of the boxplot but our results differ from those generated by R, especially
when calculating the whiskers.
What is the procedure used by R to perform these calculations?
Anyone can help us please?
--
View this message in context: