Displaying 20 results from an estimated 3000 matches similar to: "re-ordering bwplot"
2010 Dec 17
2
newbie question on str output
Hi!
Here is some output from an str command:
> str(CO2)
Classes ‘nfnGroupedData’, ‘nfGroupedData’, ‘groupedData’ and
'data.frame': 84 obs. of 5 variables:
$ Plant : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 1 1 1 1 1 1 1 2
2 2 ...
$ Type : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1 1 1 1 1
...
$
2017 Oct 08
2
Manipulations with CO2 dataset on R
Hi,
I just started a new course this semester on R, I never used it in my life and i'm stuck on these questions from 3 days, it would be really nice if someone could explain me the answers with the relative commands.
thanks a lot in advance
The following 7 questions are based on the CO2 dataset of R.
1) How many of the plants in CO2 are Mc2 for Plant?
2) How many are either Mc2 or Mn2?
2010 May 07
4
Any way to apply TWO functions with tapply()?
I need to compute the mean and the standard deviation of a data set and would
like to have the results in one table/data frame. I call tapply() two times
and do then merge the resulting tables to have them all in one table. Is
there any way to tell tapply() to use the functions mean and sd within one
function call? Something like tapply(data$response, list(data$targets,
data$conditions), c(mean,
2011 Aug 20
1
Groups and bwplot
Dear R-users,
A while ago, Deepayan Sarkar suggested some code that uses the group
argument in bwplot to create some 'side-by-side' boxplots
(https://stat.ethz.ch/pipermail/r-help/2010-February/230065.html). The
example he gave was relatively specific and I wanted to generalize his
approach into a function. Unfortunately, I seem to have some issues
passing the correct arguments to the
2006 Mar 15
1
filtering in aggregate
Hello all,
I have a data frame with year, month, species, fishing gear and catch
(Y, M, S, F, C) and I want the sum of C by Y for species "A" and fishing
gear "trawl".
I tried things like aggregate(C[S=="A" & F=="trawl"], list (Year =
Y[S=="A" & F=="trawl"]), fun=sum), but it didn't worked.
To overcome this problem I did
2004 Jan 02
1
bwplot and panel.bwplot
Hello,
I am trying to use "bwplot" to display whisker boxes according to some conditioning factors ("age" has two values 1/2). I get the following messages:
> library(trellis)
> bwplot(dvk95~age|site*season,panel=function(x,y){panel.bwplot(x,y)})
Error in tapply(1:0, structure(list(INDICES = numeric(0)), .Names = "INDICES"), :
arguments must have
2006 Feb 06
2
turn off selected axes in bwplot
I want to turn off selected axes in bwplot. I would like to only have the bottom axis drawn, with the others off.
I have a series of bwplots that I want on one device, like this:
p1<-bwplot(x1,box.ratio=.1)
p2<-bwplot(x2,box.ratio=.1)
...
print(p1,position=c(0,.8,1,1),more=T)
print(p2,position=c(0,.6,1,.8),more=T)
...
I know about the panel functions panel.bwplot() and panel.axis(), but
2008 May 05
2
bwplot
Hi,
I have 2 questions about bwplot in R :
1) How to change the order of my different boxes in the graph ?
2) How to rename the names of the differents boxes ? because I know
how to do that with boxplot (using names) but I do not find the
equivalent parameter in bwplot.
thanks,
C?dric
2004 Jul 09
3
Problem with bwplot
Try factor(vec2) in your bwplot() call.
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ernesto Jardim
Sent: Friday, July 09, 2004 9:41 AM
To: Mailing List R
Subject: [R] Problem with bwplot
Hi,
I'm ploting some box-and-whisker plots with bwplot but I'm not getting
any box-and-whiskers ... just dots.
2006 Feb 26
2
How to produce notches in bwplot?
Dear r-helpers,
tst <- data.frame(as.numeric(x <- 1:20), f <- rep(c('hi','lo'), times
= 10))
with(tst, bwplot(f ~ x, panel = function(x, y){panel.bwplot(x, y, pch
= '|', stats = boxplot.stats, fill = 8, varwidth = T)}))
I can't figure out from the documentation how to tell stats that I
would like to see notches or (even bands).
Here is what I've
2005 Jan 17
2
bwplot: how not to draw outliers
RenE J.V. Bertin wrote:
> Hello, and (somewhat belated) best wishes for 2005.
>
> Can one order not to draw outliers in bwplot, or at least exclude them from the vertical axis scaling? If so, how (or what doc do I need to consult)?
> The options that have this effect in boxplot() do not appear to have any effect with bwplot (although outline=FALSE in boxplot does *not* change the
2011 May 01
2
bwplot in ascending order
Can anyone point me to examples with R code where bwplot in lattice is used to order the boxes in ascending order? I have found the following discussion and it partly works. But, I have a conditioning variable, so my example is more like
bwplot(var1 ~ var2|condition, dat)
Th example in the discussion below works only when there is not a conditioning variable as far as I can tell. I can tweak the
2012 Sep 06
2
Lattice bwplot(): Changing Orientation of Plots in Multipanel Display
I've looked again at Deepayan Sakar's 'Lattice' book and not seeing the
information I know must be in there. A clue stick would be much appreciated.
A pair of box-and-whisker plots for two conditions of the same data set
display each box plot horizontally (see attached pH figure). Relations of
the two are not as easily seen as they would be if the two panels had the
plots
2010 Sep 20
1
Adjusting Font Size: lattice / bwplot
Hello,
If you run the following code with lattice installed:
bwplot(voice.part ~ height, data=singer, xlab="Height (inches)")
There will be some text in the graph e.g. Soprano 1, Soprano 2, etc -
60, 65, etc and the title: Height (Inches). How can one make the font
for this text larger and/or bold? Also, is there a way to thicken or
bold the lines of the box and whisker plot?
Thank
2010 Nov 02
1
Colour filling in panel.bwplot from lattice
Inspired by colouring the dots of box-whisker plots I am trying to also
fill the boxes (rectangles) with different colours. This seems not to
work as I expected.
Looking at the help page of panel.bwplot it says: 'fill - color to fill
the boxplot'. Obviously it is only intended to fill all boxes with only
one colour?
Nevertheless the following example shows, that 'fill' from
2008 Jun 16
2
Lattice: Superpose bwplot and dotplot [newbie question]
Hello everyone
I have dataset containing a monetary value (ABS) and two factors (Fct,
Group). I am able to create useful using:
bwplot(ABS~Group|Fct)
and
dotplot(ABS~Group|Fct)
Question: What do I have to do to overlay the dotplot with the bwplot (same
data set)?
I've found a couple of posts that hinted at the possibility of doing that,
and checked the panel.superpose() help, but the info
2005 Mar 23
2
alternative to 'groups' for lattice bwplot()
Hi,
Is there some alternative to the 'groups' argument in lattice's bwplot
function for boxplots? Say in the example below:
bwplot(yield ~ site | year, data = barley)
you want to have two side by side boxplots per site, corresponding to each
year in the barley data frame. Ideally, the space between boxplots of the
same site should be smaller than that between boxplots of different
2003 Aug 05
2
bwplot colours
Dear All,
is any way I can change the colours of the box and umbrella of a bwplot
without having to go to the length of:
box.rectangle<-trellis.par.get("box.rectangle")
box.rectangle$col<-"black"
trellis.par.set("box.rectangle", box.rectangle)
etc...
but straight from the call:
bwplot(y ~ x | z, mydata) ?
Regards,
Federico Calboli
2004 Mar 22
2
calling bwplot within a for loop
Hi,
I am working with R 1.81. When I call bwplot() it prints the output to the
windows device as it should. For example,
d<-data.frame(y=c(2,3,4,5,12,14,16,11),x=c(rep("group1",4),rep("group2",4)))
bwplot(y~x,data=d)
This code results in a parallel boxplot. That is a single plot with 2
boxplots next to each other; a boxplot for "group1" and a boxplot
2011 Mar 26
2
simple if question
Hi everyone,
I have just got different samples from a dataframe (independent and
exclusive, there aren't common elements among them). I want to create a
variable that indicate the sampling selection of the elements in the
original dataframe (for example, 0 = no selected, 1= sample 1, 2=sample
2, etc.).
I have tried to do it with ifelse command, but the problem is that the
second line