Displaying 20 results from an estimated 3000 matches similar to: "Adding error bars to a trellis barchart display"
2005 Jun 25
1
Confidence interval bars on Lattice barchart with groups
I am trying to add confidence (error) bars to lattice barcharts (and
dotplots, and xyplots). I found this helpful message from Deepayan
Sarkar and based teh code below on it:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50299.html
However, I can't get it to work with groups, as illustrated. I am sure I
am missing something elementary, but I am unsure what.
Using R 2.1.1 on various
2010 Nov 30
2
Error bars in lattice barchart with groups
Dear R-users,
i want to plot gene regulation data in a lattice barchart. To illustrate
the problem i encounter, the following code uses the "barley"dataset:
library(lattice)
barley[["SD"]] <- 5
PLOT <- barchart(data=barley, yield~variety|site, groups=year,origin=0,
as.table=TRUE,
scales=list(x=list(relation="same",
rot=30),
y=list(alternating=3,tck=-1)),
2009 Oct 12
1
Loading data to Trellis barchart plot.
Dear all,
I have a question about loading the data to barchart plot. I know this could
be a very easy question, but I just can not get my head around.
What I need to do is to create a trellis plots barchart style (horizontal
bar), with levels of one variable (ie. variable “colour” in my example) as
ylab and frequency as xlab on each trellis plot. The trellis plots is
separated based on
2005 Feb 15
1
Trellis barchart, column display order issue
I have searched the archives and instructions high and low but have not
found what I need.
I have a dataframe named Data with columns:
AdjResND0 - the numeric result
Parameter - the classification (chemical name)
Sort - the order I want the chemical names to appear, with leading zeros
so all are the same length
Client.Name - the sample name
I am trying to generate a series of 1 page barcharts,
2007 Jun 21
1
barchart in trellis and NA
Hi,
I've a dataset with discrete data and several groups and in one group I
have also missing values (NA). When I use table and barchart to
visualize the counts I never get a bar for NA in the barchart although
it appears in the result of table. Is there a possibility to get this
bar too?
Thanks in advance Sigbert Klinke
2006 Jan 25
2
panel function with barchart (lattice)
Folks at R help,
I can't quite get the panel function to work the way I
want within barchart.
I guess I'm still not understanding how to piece
together multiple panel
arguments, especially when "groups" is specified.
Example: I want to be able to add the value of "yield"
to each section of
each bar in this graph:
barchart(yield ~ variety | site, data = barley,
2007 Jun 22
1
Barchart legend position
I am using barchart to make charts for some data with a lot more
functions and labels and such in the command.
barchart(Freq ~ factor(HH), data = dataset1, group= year)
So I have my data grouped by year and I get a legend at the top of
graph, which is great cause I need the legend for the different years
but it is a weird spot. So how can I manipulate the legend, ie. Move
it, shrink it, do
2003 May 08
2
border of bars in lattice barchart
Hello!
How to change a color (or linewidth) of
border in lattice 'barchart'?
I am trying
barchart(
(......) - my arguments
panel=function(x,y,color,subscripts,groups,...)
{
panel.barchart(x=x,y=y,box.ratio=2,col=color,border=FALSE)
}))
or
...
panel.barchart(x=x,y=y,box.ratio=2,col=color,border='transparent')
...
or
2005 Apr 21
3
Need help with R date handling and barchart with errorbars
Hi All..
Have a question.. For the following r code
testdata <- as.data.frame(t(structure(c(
"1/1/04","LV1",3.8,2,87,
"2/1/04","LV1",3.2,3,28,
"3/1/04","LV1",3.4,3,88,
"4/1/04","LV1",3,2,26,
"5/1/04","LV1",3.8,2,87,
"6/1/04","LV1",3.2,3,28,
2008 Jul 16
2
barchart with bars attached to y=0-line
Dear R users,
i am using the following code to produce barcharts with lattice:
Compound<-c("Glutamine", "Arginine", "Glutamate", "Glycine", "Serine",
"Glucose", "Fructose", "Raffinose",
"Glycerol", "Galacglycerol", "Threitol", "Galactinol", "Galactitol")
2002 Jun 17
1
Clusters of adjacent bars in barchart()
Can I create a barchart in lattice with clusters of adjacent bars, which is
possible with barplot() when beside=TRUE? How can I
accomplish the grouping in lattice that is done with
inputting a matrix to barplot()?
Thanks,
Scott Waichler
Hydrology Group/Environmental Technology Division
Battelle Pacific Northwest National Laboratory
________________________________________________
2006 Apr 14
1
Adding values to top of bars in barchart
Given the following data frame ("freq.sp"),
> str(freq.sp)
`data.frame': 42 obs. of 4 variables:
$ behav : Factor w/ 6 levels "approach","bowride",..: 1 1 1 1 1 1 1 2
2 2 ...
$ species: Factor w/ 7 levels "COAST_SPOT","EAST_SPINR",..: 1 2 3 4 5 6
7 1 2 3 ...
$ n : int 193 194 563 357 570 369 74 194 208 633 ...
$ pct :
2010 Jan 20
3
barchart with stacked and beside bars
Hi,
Is there a way to stack bars in a barchart as well as "beside" bars for the
same treatment? eg....
I have one barchart like this:
bio<-matrix(c(10,23,9,25),nrow=2,byrow=T)
ntreat<-c("n0","n96")
colnames(bio)<-ntreat
barplot(bio,beside=T)
now i want a similar barchart but with stacked bars:
2002 Dec 10
1
lattice barchart with "negative" bars
Dear all,
I'm trying to use the lattice barchart function to obtain a bar plot of a
variable for different values of two factors. The thing I'm trying to do is
something like this:
> barchart(MyVar ~ season | place, data=mydataset)
My problem is that the column MyVar has some negative values and I would like
them to be represented as bars stacking down from zero instead of what
2002 Mar 27
2
Vertical bars with barchart()
I would like to create a barchart that has vertical instead of horizontal
bars. My goal is something similar to Figure 6.10 (p. 166) in
"The Basics of S and S-plus," except for the orientation of the bars.
I don't think bwplot() or xyplot() will work. Any suggestions?
Scott Waichler
Hydrology Group/Environmental Technology Division
Battelle Pacific Northwest National Laboratory
2008 May 02
1
Errors bar in barchart
Hi,
I user barplot2 to make a plot bar with errors bars. In old times I needed to
use a sequence of segments commands to make this.
Now I try to make the same but using lattice. Is possible to use barplot2 in
barchart function?
If not, what is the simplest way to put errors bar in barchart? I try to find
an example in Lattice book, but dont find anythink like this.
Thanks a lot
Int?
Ronaldo
2009 Mar 30
1
advice for alternative to barchart
hi folks,
I was wondering if anybody could give me some advice. I've created a
stacked barchart, with 'car model' along the x axis, 'number of cars' along
the y axis. There are 45 individuals involved, each of which can own any
number of cars, of any model (eg an individual could own two cars of one
model, and another car of a different model). I've got a legend by the
2012 May 01
1
error bars for a barchart
Hi
I have the following barchart to which I want to add error bars.
library(lattice)
barchart(Change~fTreat,groups=Process,change,
auto.key=list(points=FALSE,rectangles=TRUE),
panel=function(x, y,...){
panel.barchart(x,y,origin = 0,...);
panel.abline(h=0,col="black",...);
}
)
I have tried
2008 Apr 18
1
Vertical bars with barchart
Hallo,
What is the right way to get vertical bars in
a barchart?
For instance
barchart(VADeaths,
key=simpleKey(colnames(VADeaths),points=F,rectangles=T))
gives what I need,
only I would like the bars to be vertical.
But
barchart(VADeaths,horizontal=F,
key=simpleKey(colnames(VADeaths),points=F,rectangles=T))
does not give what I need,
and I do not understand how to change the
2004 May 12
1
Barchart questions
I am attempting to produce a bar chart and am having some trouble with the panel.barchart command. The definition of X is that it's the "proper extent of the bar". Is that the maximum value? Or is it the labels for my vertical axis, since the axes seem to be switched for this command? Is there a better/different command I should be using for barcharts (i.e. barplot)?
Thanks for your