Displaying 20 results from an estimated 10000 matches similar to: "Re What am I doing wrong with xyplot?"
2002 Apr 30
0
What am I doing wrong with xyplot?
G'day
I was playing around with R trying out some of the plotting functions when I came across
what may be a bug in xyplot or (more likely) me doing something wrong.
try this:
x<-1:10
y<-sin(x) #yes I know it's an under sampled function
xyplot(y~x)
lines(x,y) #at this point the lines do not lay on the xypoints
spline(x,y)
points(x,y) # in my installation the points(x,y)
2006 Jun 09
0
interaction terms in regression analysis
G'day,
My problem is I'm not sure how to extract effect sizes from a nonlinear
regression model with a significant interaction term.
My data sets are multiple measurements of force response to an agonist
with two superimposed treatments each having two levels.
This is very similar to the Ludbrook example in Venables and Ripley.
The experiment is that a muscle is exposed to an agonist
2011 Feb 21
1
wrong lines in auto.key xyplot
Hi all,
I'm having a problem with the auto.key function in xyplot.
I changed the symbols an lines styles using these commands
trellis.par.set(superpose.symbol=list(pch=c(0,1,2,3,4,5,6,8,15,16)))
trellis.par.set(superpose.symbol=list(col=c(rep("black",11))))
trellis.par.set(superpose.symbol=list(cex=c(rep(0.6,11))))
2008 Jul 21
0
xyplot: distance between axis and axis-label gets wrong
Hi!
I just started reading the wonderful Lattice book and I finally found a
quite elegant solution for nicer log-ticks. However, there are some
problems with the spacing between the axis label and the axis tick
marks. It seems that lattice estimates the space wich gets used by the
labels before it calls the yscale.components function. However, this
function can change what is supposed to be
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,
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)
2004 Oct 07
3
"R CMD check" with R 2.0.0
G'day all,
I am not sure whether I should file this as a bug report, but I
thought that I should make the developers of R aware of the following
feature:
I have just installed R 2.0.0 and when I run "R CMD check" on the
source of some packages, I noticed that the XXX-examples.ps file
contains one page with two graphics overlaid. This seems to happen
when the first graphic is
2006 Oct 13
3
Adding per-panel text to panel strips in lattice xyplot
I would like to add auxiliary information to the bottom of two strips on
each panel that comes from a table look-up using the values of two
variables that define the panel. For example I might panel on sex and
race, showing 3 randomly chosen time series in each panel and want to
add (n=100) in the bottom strip to indicate the 3 curves were sampled
from 100. Is there a not-too-hard way to do
2010 Jan 10
3
How to control spaces between axis, tick and label in xyplot or xYplot?
Dear R users,
I encounter a problem regarding space control in xyplot. Basically, I want
to control spaces between label, tick and axis. I remember there is a
function called mgp in general plot. Is there a similar function for xyplot
or xYplot?
Below is my basic code:
myplotkid<-xyplot(expected_offspringnumber~afr|decade,groups=SES,data1,
2004 Jul 16
1
highlighting subset of point with xyplot (or Hmisc(xYplot))
Hello all,
I am trying to use xyplot to give a six panel plot and to highlight
only points (in any panel) that meet a certain criterion. With the
plot command I would do something like:
plot.default(filein$Site,filein$circ.conc)
points(filein$Site,filein$circ.conc,type="p",
pch=ifelse(filein$p.value<5e-02,19,21))
I had thought I could just stick in the pch line from above into
2002 Apr 17
1
No output from (lattice) xyplot called within loops
Hello
>From the following script I received
a grafic output when I called:
- xyplot.test( 'green3' )
- call.xyplot.test( 'blue3' )
I did NOT receive a grafic output
when I called:
- loop.xyplot.test( 'red3' )
What's the Problem?
NB: I am using R 1.4.1 on Linux.
--------- START OF SCRIPT ----------------
n <- 1000
x <- seq( 1, n )
y <- rnorm( n )
2004 Mar 26
1
xyplot inside a for loop problem
Hello everyone
Could someone please explain me why are xyplot() calls inside a for loop
unsuccessful?
Calling plot() is OK but xyplot() just opens the graphics window and that
is all. No error, no warning :-( The same xyplot() outside for loop works
fine.
---------------------------------------------------------
library(lattice)
# OK:
plot(1,2,type='p',main='standalone plot')
#
2006 Jun 08
1
panel.abline and xyplot
Dear All,
I am wondering on how to use the abline.xyplot with xyplot such that I will have different vertical lines for each panel. More sepcifically, suppose that the xyplot generates 4 panels defined by the combination of two binary variables: X_1 and X_2. i.e.
xyplot(Y ~ Z | X_1*X_2, data = df)
I want something like:
abline(v = 5) if X_1=0 and X_2 = 0
abline(v =
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
2007 Apr 21
0
possible bug in xYplot and smean.cl.normal
I'm using R (2.4.1) and Hmisc (3.3-1), and I'd like to plot confidence
intervals using xYplot and smean.cl.normal (or smean.cl.boot) from Hmisc.
You can do that using the summarize() to produce a new data.frame and then
plot with xYplot, or by specifying method=smean.cl.normal in the xYplot.
Both produce very similar graphs in all trivial examples I've tried, but not
in the attached
2006 Oct 03
1
postcript file / xyplot function [Broadcast]
This is FAQ 7.22. Lattice functions produce graphic objects, which are not
displayed by default. If you print your graph, you should be fine. Also,
take a look at the documentation for panel.xyplot. Using type = c("p", "r")
should make things simpler.
Regards,
Matt Wiener
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at
2010 Feb 08
3
What is the equivalent function in R to xyplot in S?
Page 140 of MASS uses the function xyplot. But I don't find it in R.
Is there a package that I should load to use xyplot. Or there is a
function with a different name in R that does the same thing as xyplot
in S.
xyplot(Gas ~ Temp | Insul, whiteside, panel =
function(x, y, ...) {
panel.xyplot(x, y, ...)
panel.lmline(x, y, ...)
}, xlab = "Average external temperature (deg. C)",
ylab
2006 Dec 15
1
xyplot: logarithmic y-axis
This should be simple but I am struggling. I like to easily switch in xyplot
between a linear or logarithmic y-axis by setting a logical flag logY to
False or True. This switch changes the scales argument of xyplot. I found
out that the original two-dimentional data (Conc vs Time in my case) are
converted to log10(Conc) if log=TRUE in scales, but it appears that
functions like panel.curve need to