Please stop posting in HTML and use dput() to provide data (as the
posting guide requests).
Cheers,
Bert Gunter
Bert Gunter
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
-- Clifford Stoll
On Sun, Sep 6, 2015 at 8:37 AM, Sergio Fonda wrote:
Thanks
On Tue, May 20, 2014 at 2:21 AM, William Dunlap wrote:
> Another method uses the core boxplot() function but replaces the usual
> call to split() with a variant that puts all the data at the end of
> the list of splits:
>
> > splitPlusAll <- function(x, ...) c(split(x, ...), list(All=x))
Another method uses the core boxplot() function but replaces the usual
call to split() with a variant that puts all the data at the end of
the list of splits:
> splitPlusAll <- function(x, ...) c(split(x, ...), list(All=x))
> boxplot(with(mtcars, splitPlusAll(wt, list(gear,am), drop=TRUE)))
> boxp
Great,
Thanks everyone :-)
On Monday, May 19, 2014, Richard M. Heiberger wrote:
> tmp <- data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)),
> g=rep(letters[1:3], each=20))
>
> library(lattice)
> library(latticeExtra)
> A <- bwplot(y ~ g, data=tmp)
> B <- bwplot(y ~ rep("Y",60), data=tmp, horizo
tmp <- data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)),
g=rep(letters[1:3], each=20))
library(lattice)
library(latticeExtra)
A <- bwplot(y ~ g, data=tmp)
B <- bwplot(y ~ rep("Y",60), data=tmp, horizontal=FALSE)
resizePanels(c(Individual=A, "All Together"=B, layout=c(2,1)), w=c(3,1))
## for ev
> I have boxplots by factors for a dataset and trying to include a boxplot to
> represent the entire dataset.
Have a look at last the example in ?boxplot which plots a second set of values
beside a first set. In your case, specifying xlim larger than needed by one and
then using boxplot(x, at=
Read the posting guide, which tells you to provide a minimal reproducible
example [1] (there it's more than one way to accomplish what you have done
already) and post using plain text (so your R code comes through without being
corrupted).
[1]
http://stackoverflow.com/questions/5963269/how-to-
Ah nice. I clearly misunderstood and thought that facet_wrap() made sense.
John Kane
Kingston ON Canada
> -Original Message-
> From: ruipbarra...@sapo.pt
> Sent: Wed, 31 Oct 2012 19:45:33 +
> To: dysonspher...@gmail.com
> Subject: Re: [R] boxplots of various le
WOW Richard. Nice. This really did the trick. I will continue to work
at it to tweak things.
This community is great. Thanks so much all of you. I am making it a
priority to be rid of my noob status.
Kenneth Stephen Dyson
Chercheur postdoctoral
Groupe de recherche sur le système nerveux central
I would use bwplot in lattice for this example.
library(lattice)
library(latticeExtra)
mydata$dtime <- factor(mydata$dtime)
useOuterStrips(bwplot(BRCLNET ~ dtime | side * group, data=mydata,
xlab="time"))
On Wed, Oct 31, 2012 at 3:45 PM, Rui Barradas wrote:
> Hello,
>
> Like this?
>
>
> library
Hello,
Like this?
library(ggplot2)
set.seed(3101)
mydata <- data.frame(
BRCLNET = rnorm(1000),
group = rep(c("1", "2"), each = 500),
side = sample(c("Left", "Middle", "Right"), 1000, replace = TRUE) ,
dtime = rep(1:10, 100))
p <- ggplot(mydata , aes(factor(dtime), BRCL
ok this is close, thanks for your effort
i will be more specific about my data set now, maybe that will help.
there are 2 cats, labeled rs29 and rs30
there are a number of experimental results, i will make a graph set for
each one. for example we can look at the results of BRCLNET.
the tasks are
I am not sure I understand exactly what you want but does this do anything like
what you want?
library(ggplot2)
mydata <- data.frame(result = rnorm(100), group = rep(c("1", "2"), each =
50),
side = sample(c("L", "R"), 100, replace = TRUE) , dtime
= rep(1:10, each=10))
Have a look at this:
http://stats.stackexchange.com/questions/15486/plotting-a-boxplot-against-multiple-factors-in-r-with-ggplot2
Hope it helps.
José
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of dysonsphere
Sent: 30 October 2
Tarmo Remmel wrote on 09/20/2011 09:51:45 AM:
>
> Hello list members,
>
> I am working with simulated data for landscape pattern analysis. I have
> 1000 replicates of binary (2 colour) gridded landscapes at each
combination
> of 9 levels of class proportion and 11 levels of spatial
autocorrela
Hi Martin,
As Sarah said, I do not know of any way to "change the default", but
you can certainly do it manually each time. Here is an example:
## generate some data
set.seed(10)
x <- rnorm(101)
## store boxplot results
s <- boxplot(x, plot = FALSE)
## look at them
s
## replace the stats with lo
Martin,
I don't know of an easy way to make that change, but do note:
The two ‘hinges’ are versions of the first and third quartile,
i.e., close to ‘quantile(x, c(1,3)/4)’. The hinges equal the
quartiles for odd n (where ‘n <- length(x)’) and differ for even
n. Whereas the q
On 2010-07-07 18:24, fsch wrote:
I managed to solve the problem myself using:
q=sort(unique(foram$stage[which(foram$length>0)]))
boxplot(foram$logl~foram$stage, data=foram, outline=F, at=q, axes=TRUE,
add=TRUE, col="gray82", medlwd=1)
points(foram$stage,foram$logl, cex=.1)
However, for fut
Try scatterplot() in the car package. It draws boxplots for X & Y in
the margins, auto scaled to the axes
fsch wrote:
Hello-
I'm new to R, coding and stats. (Oh no.)
Anyway, I have about 12000 data points in a data.frame (dealing with
dimensions and geological stage information for fossil p
I managed to solve the problem myself using:
q=sort(unique(foram$stage[which(foram$length>0)]))
boxplot(foram$logl~foram$stage, data=foram, outline=F, at=q, axes=TRUE,
add=TRUE, col="gray82", medlwd=1)
points(foram$stage,foram$logl, cex=.1)
However, for future reference since this was my fir
Would it really be so hard to
provide commented, minimal, self-contained, _reproducible_ code
?
-Peter Ehlers
On 2010-07-07 15:16, fsch wrote:
Hello-
I'm new to R, coding and stats. (Oh no.)
Anyway, I have about 12000 data points in a data.frame (dealing with
dimensions and geological s
On 7/7/2010 1:11 PM, Ian Bentley wrote:
Hi all,
I'm trying to use ggplot to make a boxplot of some data, but I can't seem to
figure out how to make it use the data I'm giving it.
The data is in a data.frame so that it has two columns:
meltl
value L1
1234 1
1234 1
1235 1
...
1255 1
2335
What about this:
> testdata <- cbind.data.frame(value = runif(100), L1 = rep(1:10, each=10))
> head(testdata)
value L1
1 0.3370902 1
2 0.6766098 1
3 0.2433171 1
4 0.8848674 1
5 0.5253600 1
6 0.4067238 1
> tail(testdata)
value L1
95 0.8149121 10
96 0.5186669 10
97 0.1080695 1
On Fri, 2010-05-14 at 09:31 -0700, Angelica wrote:
> Hello,
> I need to make some boxplots, but I only have the stats and not all the
> data. Is there any function or command that I could use?
>
> Thanks,
> Angelica,
?bxp
See ?boxplot and the object returned by boxplot from one of the exampl
On Feb 22, 2010, at 5:11 PM, kupz wrote:
I have four boxplots, stacked on top of one another (vertically).
There are
five classes that the continuous variable is set against. The
problem I have
is the data for the second boxplot only contains values for four of
the five
classes.
I woul
I'm guessing that you want side-by-side boxplots.
If that's correct, then try the following.
It stacks the y-values, makes an appropriate grouping
factor and plots with reasonable spacing.
dat <- read.table(textConnection("
tank TanksTotal cons_hat
1aa4 5.651017 5.59
2aa5
Try this
Rich
tmp <- data.frame(
y=rnorm(100),
category=rep(factor(letters[1:5]),each=20),
level=rep(factor(0:1), length=100))
tmp
table(tmp[,2:3])
tmp$y[with(tmp, category=="a" & level=0)] <- NA
tmp$y[with(tmp, category=="a" & level==0)] <- NA
tmp$y[with(tmp, category=="e" & level==1)] <- NA
t
reproducible code.
On Wed, Jun 24, 2009 at 8:53 AM, Santosh wrote:
> Dear R-sians..
>
> I am trying to plot boxplots with side-by-side option.. I tried some of the
> posted suggestions and could not make it work due to unequal sizes of
> categories...
>
> e.g.
> weekly measured water depth values
Well, the symbols function will add boxplots to an existing plot wherever you
want. But, you should really consider what question(s) your are trying to
answer. As a general rule, adding things to a barplot will do more to distort
the barplot than add additional information. If the boxplot con
Does boxplot(as.data.frame(final)) do what you want?
--Adam
On Mon, 2 Feb 2009, Vemuri, Aparna wrote:
Dear R users,
I have a matrix "final" which looks like this:
final
oSO4 oNO3 mSO4 mNO3
[1,] 3.3728 0.2110 1.9517421 1.01883602
[2,] 0.8249 0.0697 1.5970292 0.113687
Hi Vemuri:
is this what you want?
x <- "oSO4 oNO3 mSO4 mNO3
3.3728 0.2110 1.9517421 1.01883602
0.8249 0.0697 1.5970292 0.11368781
0.2636 0.1004 0.6012445 0.24356332
8.0072 0.3443 6.1016998 3.63207149
13.5079 0.6593 12.4011068 1.55323386
6.1293 0.1989 5.7620926 0.12884845
0.6004
Check out ggplot2:
http://had.co.nz/ggplot2
Particularly:
http://had.co.nz/ggplot2/geom_boxplot.html
Looks like you'll have to melt your data to long format first though,
here's a tutorial:
http://www.statmethods.net/management/reshape.html
On Mon, Feb 2, 2009 at 8:19 PM, Vemuri, Aparna wrote:
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
I have no idea of what you would like to do with the tick marks. I
assume you can always use 'axis' to label your axis:
boxplot(len ~ dose, data = Tooth
We need to have some idea of what the data looks like and what code you have
been trying to make any sensible suggestions.
Can you supply a small example ?
--- On Thu, 11/13/08, Lathouri, Maria <[EMAIL PROTECTED]> wrote:
> From: Lathouri, Maria <[EMAIL PROTECTED]>
> Subject: [R] Boxplots w
Georg,
A boxplot does not have a mean-bar. It has a median bar.
Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary): +61 7 3826 7304
Mobile: +61 4 8819 4402
Home Phone:
?boxplot
The boxplot does not show the mean but the median:
median(c(0,15,0,60,0,0,0,0,0,60,60,0,60,0,30,0))
> b <- boxplot(c(0,15,0,60,0,0,0,0,0,60,60,0,60,0,30,0))
b$stats
[,1]
[1,]0
[2,]0
[3,]0
[4,] 45
[5,] 60
_
Professor Michael Kubovy
Univ
As with many things, I suspect that someone has created plots of this
sort, but no-one seems to have contributed a function to do so. If
you find/create one, send it to me and I'll be glad to include it in
either gmodes or gplots as appropriate.
One place to check before writing one is Fra
37 matches
Mail list logo