Displaying 20 results from an estimated 10000 matches similar to: "Error Bars in lattice- barcharts"
2006 Jun 06
2
error bars in lattice xyplot *with groups*
Hi all,
I'm trying to plot error bars in a lattice plot generated with xyplot. Deepayan
Sarkar has provided a very useful solution for simple circumstances
(https://stat.ethz.ch/pipermail/r-help/2005-October/081571.html), yet I am
having trouble getting it to work when the "groups" setting is enabled in
xyplot (i.e. multiple lines). To illustrate this, consider the singer data
2008 Jun 26
3
Connecting lines across missing data points, xyplot
All,
I have data across 5 time points that I am graphing via xyplot, along with
error bars. For one of the variables I have missing data for two of the
time points. The code below is okay but I can't seem to get the lines to
connect across the missing time points. Does anyone now how to rectify
this?
Cheers,
David Afshartous
library(lattice)
## the data
junk = data.frame(
Visit =
2012 May 29
2
use xyplot to plot mean and CI by groups
Dear R users,
I am trying to use xyplot to draw group mean and CI. The following is the
sample code. But I want:
1. Use different colors and symbols to draw individual points, CI and
the lines connect group means from different time points;
2. Add jitters to x axis to allow CIs not be overlapped
Could anyone modify the attached code to achieve this?
Thanks
library(lattice)
2006 Oct 12
2
adding error bars to lattice plots
Dear R users,
About a year ago Deepayan offered a suggestion to incorporate error bars
into a dotplot using the singer data as an example
<<http://finzi.psych.upenn.edu/R/Rhelp02a/archive/63875.html>>.
When I try to utilize this code with a grouping variable, I get an error
stating that the subscripts argument is missing. I have tried to insert
them in various ways, but cannot
2010 Nov 10
0
error bars in lattice barchart
Hi all,
I've read the emails of Dan, Deepayan and Sundar about adding error bars to
the lattice plots (
https://stat.ethz.ch/pipermail/r-help/2006-October/114883.html), but I still
have the problem when I want to adding error bars to barchart. I tried both
the solution of Deepayan and Sundar but without luck. Here is my code (I
changed prepanel.ci and panel.ci a little to plot bars
2011 Aug 04
0
error bar plot with log scale in lattice
Hi, all,
I'm trying to modify the code to a log scale for y-axis from the post
http://tolstoy.newcastle.edu.au/R/help/06/06/28612.html
However, the error bar did not change accordingly. The following is the code I used based on the singer.ucl data.
Thanks in advance!
prepanel.ci <- function(x, y, ly, uy, subscripts, ...)
{
y <- as.numeric(y)
ly <-
Equal confidence interval arrowhead lengths across multiple-paneled lattice plots with free y-scales
2007 Nov 15
1
Equal confidence interval arrowhead lengths across multiple-paneled lattice plots with free y-scales
Hi.
I've got a lattice plot with multiple panels and two groups superimposed
on each panel. Each panel has an independently scaled y-axis (scales =
list(relation = "free")).
I've successfully put up 95%CI error bars using panel.arrows (and some
help from the mailing list). My question is whether I can "unscale" the
arrowheads so that they appear to have the same
2010 Dec 15
1
pmnorm: probabilites don't sum up to 1
Dear list member,
I struggle with the problem, why the probabilities of choosing one of
three mutually exclusive alternatives don?t sum up to 1!
Let?s assume we have three alternatives X, Y, and Z. Let?s further
assume we know their respective utilities:
uX, uY, uZ. I?m interested in calculating the probability of choosing
X, Y, and Z.
Since I assume that the alternatives are mutually
2003 Aug 21
2
levelplot behaviour for panel with constants
In the example:
x = rep(c(0,0,1,1),4)
y = rep(c(0,1,0,1),4)
z = c(1,0,1,0,0,0,1,1,0,1,0,0,1,1,1,1)
f = as.factor(c(rep("a",4),rep("b",4),rep("c",4),rep("d",4)))
levelplot(z~x+y|f,data.frame(x=x,y=y,z=z,f=f))
I noted that the last ("d") plot remains empty. I guess the
reason for this is that the values are constant (1), but I consider
it more
2007 Feb 24
2
barchart (lattice) with text labels
I would like to place the value for each bar in barchart (lattice) at
the top of each bar. Something like the following code produces.
library(lattice)
mypanelfunc <- function(x, y, ...)
{
panel.barchart(x, y, ...)
panel.text(x, y, labels=as.character(round(x,2)), ...)
}
myprepanelfunc <- function(x, y, ...) list(xlim=c(0, max(x)+.1))
mydata <- expand.grid(a=factor(1:5),
2008 Jun 16
0
Error bars within xyplot, panel = function(x,y, ....)
All,
I'm trying to adapt some code provided by Deepayan Sarkar from a previous
thread (https://stat.ethz.ch/pipermail/r-help/2005-October/081571.html) on
this topic.
## This code produces a graph w/o error bars:
xyplot(Y ~ Hr, data, groups=DRUG,
panel=function(x,y,...){
panel.xyplot(x,y,..., type=c("g", "l") )
panel.points(x,y,..., pch=16,
2011 Oct 19
1
help with x axis on lattice barchart--R-Beginner
Hi all,
I am trying to compare catch vs day over a ten year period, and the graph
looks great except for the individual dates. there are so many that my x
axis labels have become one giant black line. Can I only label some of the
days or will I be unable to fix this using a barchart?
data is called chipps
2010 Feb 14
2
lattice/ylim: how to fix ylim[1], but have ylim[2] dynamically calculated?
Hello,
When drawing "barcharts", I find it not helpful if ylim[1] != 0 - bars for a
quantity of 0, that do not show a length of 0 are quite non-intuitive.
I have tried to study
> library(lattice)
> panel.barchart
but am unable to figure out where ylim is taken care of and how one might
fix ylim[1] to 0 for barcharts ...
Can anyone point out how to tackle this?
Thanks, Joh
2007 Dec 19
1
Different labels by panel in barchart
Dear all,
I'm analysing a survey, and creating a barchart of the different responses
for each question. The questions are grouped according to a number of
categories, so I'm using lattice to create a plot with each question in a
category on it. The problem is that the response set for different
questions within the same category varies. I want to be able to draw only
the relevant
2017 Nov 21
1
R-How to unlist data frame multiple structured list column value and new column
Hi,
How to unlist list column value and add column into data frame.
Data frame
ID ContractDe PassengersDe TrainnerDe
1 list(ConID=c("Zx","78yu"),ConRes = c("98","Tut")) list(PassID
2008 Aug 07
2
panel.arrows problem in custom panel function
Dear List,
I am writing a custom panel function and xyplot method to plot the
results of a procrustes analysis from the vegan package.
I am having trouble getting the call to panel.arrows to work as I wish
when conditioning. The attached file contains the function definitions
for the xyplot method and the custom panel and prepanel functions I am
using. This example, using data and functions from
2006 Mar 01
2
lattice-Internal
Hi,
The functions prepanel.default.bwplot() and lpretty() are not running in Deepayan's
barley example concerning vertical bars with the lattice function barchart().
Why, is there a restricted use for the package lattice-Internal?
Urs Simmen
mailto:usimmen at dtc.ch
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
2007 Nov 14
1
Changing the text in the strips of lattice plots and y axis
Dear R-helpers,
I am sorry for asking something I know has been
asked before, I have tried different combinations in
the strip function without success...
I am using version 2.5.1 and work on a PC.
I have barcharts generated from the following
formula:
barchart(y1+y2+y3~x | g)
I need to change the names of the variables y1,y2 or
y3 that currently appear in the strips, I have two
2005 Mar 23
1
interp.surface() error (PR#7745)
R version: 2.001
OS: Windows XP SP2
When I use the interp.surface() function, on occasion I have encountered
the following error message:
Error in interp.surface(a, loc) : subscript out of bounds
Since it is somewhat dependent on the data set, I cannot say exactly in
which cases these occur, but I believe I have found the problem and a
solution for it:
The scaling calculations in the code,