Displaying 20 results from an estimated 900 matches similar to: "Adding error bars to xyplot()"
2013 Jan 10
2
Titles - main and subtitle won't plot with errbar
Hi, I'm struggling with errbar graphics.
I'm trying to plot an x-y graph with correct labelling, however can't seem
to get main and sub to show on my graph.
They do work when I use title(main="," etc...., but this will make it look
at lot messier,I'll have to blank out ylab=" " , and I need to try and get
the titles to update automatically according to my
2008 Nov 25
1
Strange seq() behavior
Hi,
This is really strange. Can anyone help explain what's going on here
(on 3 and 7)?
> targets <- seq(from=.1, to=.9, by=.1)
> targets[1]==.1
[1] TRUE
> targets[2]==.2
[1] TRUE
> targets[3]==.3
[1] FALSE
> targets[4]==.4
[1] TRUE
> targets[5]==.5
[1] TRUE
> targets[6]==.6
[1] TRUE
> targets[7]==.7
[1] FALSE
> targets[8]==.8
[1] TRUE
>
2008 Jul 07
2
A shorter version of ".Last.value"?
Hi,
There is an object, ".Last.value" to which the result of the most recent
evaluation is assigned. This is similar to "ans" in Matlab. In Matlab
"ans" can be very useful and time-saving, but typing the larger R
version is somewhat clunky and takes away from the usefulness.
Is it possible to reassign '.Last.value' to something simpler, like
2009 Aug 11
1
Prevent sequential repeated values in data frame column
Hi,
I'm trying to randomize a sequence of trials for an experimental
design. The trials consist of values for each of two factors. As is
there are 30 combinations of the two factors, and I want them to be
ordered randomly but with the requirement that for one of the factors,
the value can never be the same as the previous value.
I'm currently randomizing my dataframe by using:
2011 Nov 09
2
plot separate groups with plotmeans()
Hi,
I often use plotmeans() from the gplots package to quickly visualize a
pattern of change. I would like to be able to plot separate lines for
different groups, but the function gives an error when a grouping
variable is included in the formula argument.
For instance,
> require(gplots)
> x <- data.frame(Score=rnorm(100), Time=rep(1:10, 10),
2010 Oct 13
4
Change global env variables from within a function
Hi,
I've looked all over for a solution to this, but haven't had much look
in specifying what I want to do with appropriate search terms. Thus I'm
turning to R-help.
In the process of trying to write a simple function to rename individual
column names in a data frame, I ran into the following problem: When I
rename the columns within my function, I can't seem to get it to
2011 Apr 29
2
abline outside of plot region
Hi R people.
I ran into this problem: I created a plot with errbars, like this:
> errbar(x=c(1,2,3,4), y=c(2,1,3,3), yminus=c(1.5,0.5,2.5,2.5),
yplus=c(2.5,1.5,3.5,3.5))
Next, I wanted to accentuate some x value with an abline, like this:
> abline(v=2)
In one of my R sessions (which admittedly I have had open for quite a while
now), the abline draws outside of the plotting region
2007 Dec 05
1
Plotting error bars in xy-direction
Dear R-help,
I am looking for a function that will plot error bars in x- or y-direction (or
both), the same as the Gnuplot function 'plot' can achieve with:
plot "file.dat" with xyerrorbars,...
Rsite-searching led me to the functions 'errbar' and 'plotCI' in the Hmisc,
gregmisc, and plotrix packages. As I understand the descriptions and examples,
none of
2010 Apr 19
2
plotting RR, 95% CI as table and figure in same plot
Hi all--
I am in the process of helping colleagues write up a ms in which we fit
zero-inflated Poisson models. I would prefer plotting the rate ratios
and 95% CI (as I've found Gelman and others convincing about plotting
tables...), but our journals usually like the numbers themselves.
Thus, I'm looking at a recent JAMA article in which both numbers and
dotplot of RR and 95% CI are
2008 Jul 18
1
Functions similar to step() and all.effects() that work for lme() objects?
Hello,
I make frequent use of the *step()* and, for plotting, *all.effects()
*functions for *lm()* objects. I am now doing more with *lme()* random
effects models, and haven't been able to find functions similar to
*step()* or *all.effects()* which will accept *lme()* objects. Do
similar functions for either exist? If someone could point me in the
right direction it would be much
2011 Sep 15
1
Problems with aggregate() function in stats package
Hi,
I'm having some problems with the aggregate() function in the {stats}
package, and the documentation doesn't address them.
1) Why would the first line work, but the second not? According to the
help file, it accepts a "data=" argument.
> with(tsrc, aggregate(x=DistRatio, by=list(Condition), FUN=mean))
Group.1 x
1 Congruent 1.741789
2 Mismatch 1.771425
2009 Mar 10
1
Nesting order for mixed models
Hello,
I am confused about the order of nesting in mixed models using functions
like aov(), lme(), lmer().
I have the following data:
n subjects in either condition A or B
each subject tested at each of 3 numerical values ("distance" =
40,50,60), repeated 4 times for each of the 3 numerical values ("trial"
= 1,2,3,4)
Variable summary:
Condition: 2 level factor
Distance:
2008 Jul 11
2
Problems with Package Installation.
I am having difficulty installing packages. For example, here I have tried to
install "gplots" but to no avail. I have tried multiple mirrors and
different packages (errbar) but after installation I seem to be unable to
access any of the commands or help pages. I am a little concerned about the
'lib' missing message but this has been present for previous successful
package
2005 Apr 01
1
plotCI error when trying to omit upper or lower bars (PR#7764)
Full_Name: Volker Franz
Version: 2.0.1 (2004-11-15)
OS: Mac OSX / Debian
Submission from: (NULL) (84.58.8.232)
Hi there,
the new version of plotCI (Version: 2.0.3 of gplots) produces errors
if the upper or lower error bars should be omitted by passing NULL as
an argument. Older versions of plotCI had no problem with this. Here
is an example:
library(gplots)
means <- c(1,2,3,4,5)
upperw
2012 Apr 24
1
Remove top/right border from lattice plots
Hi,
I've done my best to search for a solution to this, but had no luck.
How can I create a lattice plot (I'm using xyplot() ) that does not have
a border on the top and right side, but keeps the bottom/left axes?
So far all I've found is this, which inserted into the xyplot call
removes all 4 borders:
/ par.settings = list(axis.line = list(col = 0))/
xyplot( Sepal.Length ~
2011 Nov 16
3
plotting a double y axis when x and y lengths differ
Hello All,
Many thanks to the help I have received so far.
Here is an example data set I hope to plot
Data1
Year Data SE
1 2005 2 0.01
2 2006 4 0.01
3 2007 5 0.01
4 2008 2 0.01
5 2009 3 0.01
6 2010 6 0.01
Data2
Year Data SE
1 2006 32 1
2 2007 100 2
3 2008 60 4
4 2009 67 3
5 2010 8 1
Notice Data2 has one less years worth of data than Data1 (which is my
2006 Oct 16
2
set linetype with plotCI
Dear R-list,
I'm iterating several calls to plotCI [gplots], like so:
plotCI(
x = xvals.f[sorted],
y = yvals.f[sorted],
xlim = c(xmin, xmax), ylim = c(ymin, ymax),
pch = plot_symbols[graph_idx], type = "b",
lty = plot_linetypes[1],
col = plot_colors[graph_idx],
barcol = plot_colors[graph_idx], uiw = NA,
xlab = "", ylab = "",
add =
2013 Feb 11
2
How to plot doubles series with different location using plotCI
Dear list
members,
I would
like to create two series of plotted mean values and error bars, yet with
different locations along the x-axis.
Plotting of
first series using plotCI with the standard arguments goes without any problem.
However I do not succeed to add the second series in the same plot, which
should be horizontally shifted from the first series along the x-axis. The “add=TRUE”
2006 Feb 01
1
several plots in one
Can anyone tell me how I can supply more than one graph to plotCI
(gplots) at once?
Below is what I tried, also with rbind instead of cbind.
What is the way to do this (in general, I think)?
Problem is that lines of 1-st and 2-nd series are mixed, while they have
nothing to do with each other.
I also tried calling plotCI with argument add=TRUE, which didn't seem to
work (that is actually
2012 Jan 13
1
Problems with plotCI
Got problems with plotCI (plotrix)
I only want to plot the upper part of the error bar in my barplot
I had the exact same commands working two months ago
Now I wanted to change the legend and when I ran it again plotCI stopped
working.
To me it seems like there must some bug in R
library(plotrix)
library (graphics)
x = matrix(c( 13.75516276, 3.944604404,