anel.xyplot(x, y, ...)
if (length(x) > 0) panel.lmline(x, y, ...)
})
x[subscripts] inside the panel function doesn't give anything
meaningful ('x' is already subscripted).
-Deepayan
>
> Ross Darnell
>
>
> -Original Message-
> From: Frede
groups, subscripts = subscripts, ...)
labels <- labels[subscripts]
do.labels <- do.labels[subscripts]
panel.text(x[do.labels], y[do.labels],
labels = labels[do.labels],
pos = 1, cex=0.5, ...)
})
-Deepayan
_
n' outside or just after the paste function it also
> doesn't work.
auto.key = list(text = expression(paste("foo", degree)))
should work. I think the problem is that you want a vector of
expressions, and that's a bit harder to g
s(x = 0:20/21, y = sin(70 * runif(1) * 0:20/21),
vp = viewport(x = runif(1), y = runif(1), height =
0.05, width = 0.05))
See the package documentation, or Paul Murrell's book "R Graphics" for more.
-Deepayan
__
R-help@stat
Petal.Length ~ Petal.Width | Species, iris,
par.strip.text = list(lines = 2, cex = 2))
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/post
On 9/4/07, Folkes, Michael <[EMAIL PROTECTED]> wrote:
> Thank you again Deepayan. I was failing to grasp that I could use
> panel.groups as a function. But additionally it's still not intuitive
> to me where and when I should use "..." to pass arguments on.
In mo
l',
groups = temp ,
panel = panel.superpose,
panel.groups = function(x, y, ..., lty) {
panel.xyplot(x, y, ..., lty = lty)
#panel.lines(x, rep(mean(y),length(x)), lty=3, ...) # or
panel.abline(h = mean(y), lty=3, ...)
})
(see
), y = c(0, 0),
default.units = "npc")
axis.default(side = side, ...)
})
-Deepayan
>
> An example:
>
> --8<---cut here---start->8---
> rm(list=c(ls()))
> library(lattice)
>
&
is is a transformation
of the data, not the axes. Other than the axis
labeling, using this feature is no different than
transforming the data in the formula; e.g.,
'scales=list(x = list(log = 2))' is equivalent to 'y ~
On 8/31/07, Folkes, Michael <[EMAIL PROTECTED]> wrote:
> Thanks Deepayan for your response.
> The first subset you suggest was just a test for me and not what I
> wanted.
> I can't do your second suggested subset action as I wish to plot all the
> panel data, but then ad
On 8/31/07, Christof Bigler <[EMAIL PROTECTED]> wrote:
> The suggestions by Deepayan Sarkar and Hadley Wickham work for that
> case, but I get into troubles when I try to draw e.g. a panel for "A"
> and "B":
>
> xyplot(y ~ x | f , groups=g, dat
it more formal than I wanted
> for demonstrating the use of the help shortcut.
> I would like the output to look like,
>
> > ?HSP
>
> but I can't seem to make this work.
I'm not familiar with the Scode environment, but
<>=
?HSP
@
does what you want.
-Deep
mydata$yr==2005],y[mydata$yr==2005],type='p',pch=16,col=2,cex=.5)
> # <-sometimes this won't work or it colours wrong datapoint
> }))
> ___
Why not
xyplot(yval~xval|week,data=mydata, subset = yval < 40)
or
xyplot(yval~xval|week,data=myda
:4])
For a histogram, things are a bit more complicated, but still easy enough:
my.plot = function(data)
{
splom( ~data
#, lower.panel=...
#, upper.panel=...
, diag.panel = function(x, ...)
{
yrng <- current.panel.limits()$ylim
d <- density(x)
gt;
> >scales = list(x = list(at = c(1, 2, 3), labels = c("a", "", "c")))
> >
> >etc.
>
> So no ticks without labels, as specified by the user? The above generates
> only ticks with labels.
Yes, but the second l
an
internal variable called 'linebuffer'). Since this doesn't seem to be
a common problem, you need to give us instructions on how to reproduce
it.
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-he
vels of
'groups'. If you want fewer colors (or not have unused colors in the
legend), you need to make sure your 'groups' variable has a suitably
reduced set of levels. There is no cute way to do this. The long way
is
subdata <- subset(common, Method != 4)
subdata$Me
quot;, "points")),
lines = list(lwd = 2.5, col = c("gray", "blue"),
cex = 1.25, pch = 19,
type = c("p", "l")))
-Deepayan
__
R-help@stat.mat
text = list("points"), points = list(pch=19, col="blue", cex=1.25))
> (4) Add some annotation (text) in the lower left corner ('text' for plot()
> did not work)
Use panel.text() instead inside your panel function.
-Deepayan
> I'm relatively
t is, the colors are recycled alternately in the order the
> individuals appear in the plot (1, 10, 11, 12, 2, ..., 9).
>
> How can I assign the red color to all individuals of group "A" and the
> blue color to all individuals of group "B"?
Why not simply use f as the
e formula:
do.xyplot = function( plot.formula, data.frame, plot.groups){
print(plot.groups)
environment(plot.formula) <- environment() # new
xyplot(
plot.formula
,data = data.frame
,groups = eval(plot.groups)
)
}
-Deepayan
in
http://dsarkar.fhcrc.org/R/RFAQ-2.png
The only problem here is that there is no way to distinguish between
the chapter listing and the section listings (both are ). If that could be made to have a different class, the
chapter listing could be improved.
-Deepayan
___
On 8/21/07, Douglas Bates <[EMAIL PROTECTED]> wrote:
> On 8/21/07, Horace Tso <[EMAIL PROTECTED]> wrote:
> > Deepayan, you're right. Now I realize anyone could write a densityplot
> > function to apply on a different class of objects. I guess I should write
>
,
> key = key )
> ===
A more transparent solution (IMO) is something like
barchart(Freq ~ Var2,
data = as.data.frame.table(x),
groups = Var1, stack = TRUE,
par.settings = list(superpose.polygon = list(col=rainbow(nrow(x,
auto.key = list(sp
all possible methods, especially those in
other packages. I would say that since you are using mcmcsamp(), it's
perfectly reasonable to expect you to look at its help page to figure
out what you can do with the results.
What gave you the idea that densityplot would work on the result of
mcmcsamp
ich case the default string
rotation is optimal.
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, se
)
etc. If you want to limit the range, use panel.curve, e.g.
panel.curve(0 + 1 * x,from=0,to=10)
-Deepayan
> If so, how should they
> be specified?
>
> xy<-data.frame(x<-0.1:10,y<-0.1:10)
> xyplot(y~x,data=xy,
> panel = function(x, y, ...){
&g
pattern over days and mark the
> quit attempts. Hope this is clear.
Sounds like you need to pass your 'tkmarks' variable on to the panel
function and then use 'subscripts' inside your panel function. Read
the entry on 'panel' in ?xyplot. Also,
dvance,
>
> Yuelin Li.
>
> ps. part of the code came from a solution given by Deepayan Sarkar.
>
> ---
> library(lattice)
> set.seed(12345)
> x <- 0:20
> y.male.obs <- - 1.2 * x + 22 + rnorm(length(x), sd = 3)
> y.male.prd <- - 1.2 * x +
g dev.copy? See ?png, in particular how the
``page number'' can be encoded in the 'filename' argument for
multi-page output.
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do re
On 8/5/07, Saptarshi Guha <[EMAIL PROTECTED]> wrote:
> Hi,
> After a few modifications in the makefiles, I successfully compiled
> the Qt device (written by Deepayan Sirkar) for OS X 10.4.9 on a
> Powerbook.
Cool, can you send me the modifications? I haven't managed t
change in the following code to make it work ?
>
> key=list(space="bottom",
> points = list(pch = 21:25,
> col = 32,
> bg=15),
> text=list(mylegend)),
For starters, upgrade to the latest version of R and latt
On 8/2/07, Richard M. Heiberger <[EMAIL PROTECTED]> wrote:
> Thanks Deepayan.
>
> Does that translate that I don't have to do anything else,
> and that I can submit the package in its present state to CRAN?
No, you have to make sure that 'fill' is not a factor.
several ways to do that; options include reshape(),
make.groups(), and the reshape package.
After that, something like
xyplot(len ~ age | as.factor(cohort), data = <...>,
groups = interaction(sex, source),
type = c("p", "p", "l", "l"), d
least in a zen kind of way). I presume you are
somehow protecting 'col' from becoming a factor, and that does not
translate to 'fill'.
This behaviour (of HH) is not new, and I believe you will see the same
output as above in R 2.4. What's new is that 'fill'
= brewer.pal(9, "RdBu")[ round(cor(x, y) * 4 + 5)])
panel.text(mean(x), mean(y), round(cor(x, y),2), font=2)
}
panel.pairs(..., lower.panel = my.lower.panel)
}
splom(foo, superpanel = my.panel.pairs)
-Deepayan
__
R-help@
d.text(round(mean(y), 3), 0.5, 1, vjust = 1.2)
})
The text can be put into a rectangle, to make them look like strips,
and you could use a prepanel function to make sure there's enough
space for it. Look up grid documentation for details.
There are other workarounds, e.g., using 'tre
On 7/30/07, Patrick Drechsler <[EMAIL PROTECTED]> wrote:
> "Deepayan Sarkar" <[EMAIL PROTECTED]> writes:
> > On 7/30/07, Patrick Drechsler <[EMAIL PROTECTED]> wrote:
> >> The Gmane interface seems to have some lag at the moment...
> >
a workaround is to use grid.points directly, e.g.
library(grid)
xyplot(1:10 ~ 1:10, cex = 2, lwd = 3,
panel = function(x, y, ...) grid.points(x, y, gp = gpar(...)))
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
> 4, 4, 6), labels = letters[1:4]))
List of 4
$ at : num [1:3] 13516 13518 13520
$ labels : chr [1:4] "a" "b" "c" "d"
$ check.overlap: logi FALSE
$ num.limit: num [1:2] 13515 13524
That is, 'at' is now of length 3 (and
On 7/30/07, Patrick Drechsler <[EMAIL PROTECTED]> wrote:
> The Gmane interface seems to have some lag at the moment...
>
> "Deepayan Sarkar" <[EMAIL PROTECTED]> writes:
>
> > On 7/28/07, Patrick Drechsler <[EMAIL PROTECTED]> wrote:
> >&
etween' more precisely. help(trellis.par.set) tells you
how to change settings, and you can use it to change all the
components you want (and the colors can of course be greyscale).
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.
On 7/30/07, Jenny Barnes <[EMAIL PROTECTED]> wrote:
> Dear Deepayan
>
> Thank you for your response - it has proved very very helpful, I can't thank
> you
> enough!
>
> I have another question for you if you have time to reply. I know you have
> been
>
ayout[2] * device.aspect /
panel.aspect)))
n <- ceiling(plots.per.page/m)
m <- ceiling(plots.per.page/n)
panel.layout[1] <- n
panel.layout[2] <- m
}
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
htt
(172, 182))
levelplot(volcano, add.cl = vcl,
panel = function(..., add.cl) {
panel.levelplot(...)
lapply(add.cl, panel.polygon, border = 'red')
})
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://
> coordinates for polygons describing the sub-country portion falling into a
> single eco-climatic zone, is there a way to improve the above map to show
> portions of countries belonging to a specific eco-climatic zone?
wmap$x and wmap$y are exactly that
})
> ___
> The problem is that x1 varies from 1-3, while x2 varies from 20-60. The
> output scales both independent variables the same, so all the data in
> the y vs x1 plot are up against the left edge of the plot. How do I
&
p(spcolors[1:nlevels(group)], each = nlevels(subject
Look at ?Rows, which might help in getting code that is a bit more
general (for instance, the code above may not work when groups has
more than 7 levels).
-Deepayan
__
R-help@stat.math.ethz.ch
7022807 0.19770349
2.A 22 A -0.20672870 1.49590443
3.A 33 A 0.05533779 1.35319133
4.A 44 A -0.11471772 -0.11013896
1.B 11 B 1.09573107 -0.08333043
2.B 22 B 0.07397772 -0.98555020
3.B 33 B 0.25821758 0.16808307
4.B 44 B 1.277
ssary copying, and panel functions only access one data matrix
at a time.
-Deepayan
> --- Deepayan Sarkar <[EMAIL PROTECTED]> wrote:
>
> > On 7/11/07, hadley wickham <[EMAIL PROTECTED]> wrote:
> > > > A question/comment: I have usually found that the subscripts
lls you how to specify your own levels.
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
ce.part, singer)
## using ggplot2
library(ggplot2)
qplot(height, data = singer, geom = "histogram", facets = voice.part ~ .)
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
.panel.default(layout = layout,
row = column,
column = row, ...)
})
This effectively transposes the layout, which (along with
as.table=TRUE) is what you want.
-Deepayan
__
R-help@stat.math.ethz.ch m
actually ever does that, but it's the
principle of the thing)). This happens transparently if you supply the
external data as arguments to xyplot(). It happens in your example
too, but the data is hidden inside the environment of the panel
function. The two approaches might differ in terms of memory
we have
proper multiple dispatch in S4, we can write methods that behave like
traditional Trellis calls but work with more complex data structures.
We have tried this in one bioconductor package (flowViz) with
encouraging results.
-Deepayan
__
R-help
On 7/11/07, Jonathan Williams <[EMAIL PROTECTED]> wrote:
> Deepayan,
>
> Thanks for the clarification. The rectangles are completely external
> to the panel data, and correspond to 90% confidence intervals built
> from training data, to be overlaid on these graphs of the tes
On 7/11/07, Bert Gunter <[EMAIL PROTECTED]> wrote:
> Deepayan et. al.:
>
> A question/comment: I have usually found that the subscripts argument is
> what I need when passing *external* information into the panel function, for
> example, when I wish to add results from a fit
lot(x, y, ...)
}
xyplot(Sepal.Length ~ Sepal.Width | Species, iris,
panel = panel.qrect)
If the rectangles are somehow determined externally, you probably want
to use one of the accessor functions described in help(panel.number).
There are good and bad (i.e. less robust) ways to use these, but w
ce.part, singer, par.settings = list(axis.line =
list(lwd = 3)),
scales = list(lwd = 1))
> 2) Does anybody know of a way to separate panels with whitespace?
qqmath(~height | voice.part, singer, between = list(x = 0.5, y = 0.5))
-Deepayan
__
R-
the horizontal = FALSE
> argument. With a slight modification to barchart.table this can be
> accomplished.
Thanks Sundar. This seems like a reasonable feature; I'll add it in
the next update.
-Deepayan
__
R-help@stat.math.ethz.ch mailin
On 7/8/07, Paul Matthias Diderichsen
<[EMAIL PROTECTED]> wrote:
> Hi Deepayan,
>
> "Deepayan Sarkar" <[EMAIL PROTECTED]> schrieb am 06.07.2007
> 02:05:02:
> > On 7/5/07, Paul Matthias Diderichsen
> > <[EMAIL PROTECTED]> wrote:
> >> libr
o 7% (I think
this value came from Trellis specs, but I don't remember the exact
details).
> lattice.getOption("axis.padding")
$numeric
[1] 0.07
$factor
[1] 0.6
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
...)
It probably makes sense to allow this for matrices directly, and I'll
add something in the next update.
-Deepayan
> Thanks in advance.
>
> graphic5 <- wireframe(output.matrix, shade= TRUE,
> scales = list(arrows = FALSE,
> cex=.6, col="black", font= 3, tck=1
tions are correct (they may not be, so you should check), this
equation is
Ax^2 + Bx + C = 0, where
A = (n-1)^3 - Z^2 * n * (n-1)
B = -2 * (Z^2 * n + (n-1)^2) * T1(t, n-1)
C = (Z^2 * n + n - 1) * T1(t, n-1)^2 - Z^2 * n^2 * T2(t, n-1)
Hope this helps,
-Deepayan
___
c(3,3))
If this is your use case, you might be interested in
http://cran.r-project.org/src/contrib/Descriptions/plotAndPlayGTK.html
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the pos
or order if you think of the conditioning variables as
defining a multiway cross-tabulation), and which.packet() will give
you a vector with the current level of each conditioning variable. You
can use these to extract the appropriate subset of points.
-Deepayan
s available in R, e.g. using
tapply() in your original question and rowMeans() in this example.
Sometimes you cannot, and the only way to gain efficiency is to write
custom C code (we do not have enough information to decide which is
the case in your real example, since we don't know what it is
:n_accts)
> colnames(udf) <- c("amt", "n")
> system.time(for (i in seq_along(t$amt)) {
+ idx <- t$acct[i]
+ udf[idx, ] <- udf[idx, ] + c(t$amt[i], 1)
+ }, gcFirst = TRUE)
user system elapsed
1.872 0.008 1.883
The loop is still going to be the pro
t combinations defined by more than one factor, you could
use something like
with(OrchardSprays, split(decrease, interaction(treatment, colpos)))
(although this is a bad example, since there is only one observation
per combination)
-Deepayan
__
R-help
widths = unit.c(unit1, unit2),
respect = TRUE)
lab.gf <- frameGrob(layout=lab.layout)
for (i in seq_len(nlabs))
{
lab.gf <- placeGrob(lab.gf, labs[[i]], row = i, col = 2)
}
lab.gf <- placeGrob(lab.gf, main.ylab, col = 1)
lab.gf
}
ree", y = list(draw = FALSE)),
axis = function(side, ...) {
if (side == "right")
panel.axis(side = "right", outside = TRUE)
else axis.default(side = side, ...)
},
par.settings=
lis
m=c(0,0.5),main="OCR performance",
> xlab="Filter setting",ylab="Average hits",axes=FALSE)
> points(as.numeric(krammer$filter_setting[7:12]),krammer$avg_hit[7:12],
> type="b",col=3)
> points(as.numeric(krammer$filter_setting[13:18]),krammer$a
ding = list(x = 1, units = "mm", data = NULL),
axis.key.padding = list(x = 1, units = "mm", data = NULL),
right.padding = list(x = 1, units = "mm", data = NULL))
)
lattice.options(myLatticeOptions())
I'm not particularly attac
dat<-data.frame(id=rep(c("a","b","c"),4),val=1:12,quand=rep(c("t1","t2","t3","t4"),each=3))
> > > ref<-c(10,8,6)
> > > plot.new()
> > > datplot<-dotplot(val~quand|id,data=dat,panel=function(...){
> &g
gt; panel.dotplot(...)
> panel.abline(h=ref)
> })
> print(datplot)
dotplot(val~quand|id,data=dat,panel=function(...){
panel.dotplot(...)
panel.abline(h = ref[packet.number()])
})
(Things are more complicated if you have more than one conditioning variable.)
-Deepayan
_
On 6/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Sorry. My email editor from my ISP always screws up the text after sending
> out. Below is my response to you (in plain text).
>
> Thank you Deepayan. Let's do the following exercise to reproduce the problem
> I&
e end of that same chunk
> Then the Sweave driver chokes, not finding the variable name when
> generating the figure
The reason is that by default, every fig=TRUE chunk is run twice, once
to produce postscript, once for pdf.
-Deepayan
__
R-help@
ggest a
> way to solve this problem.
>
It all depends on the details. Please give a small reproducible example.
> Also, if I would like to put in mathematical notation on the top strip of the
> plot instead of using text in my events factor vector, what can I do?
Use expressions
swer didn't
> seem to work.
> thanks
> dave
>
> x1 = rnorm(10)
> x2 = rnorm (10)
> y1 = rnorm(10)
> y2 = rnorm (10)
> op = par(mfrow = c(2,1))
> xyplot(y1 ~ x1)
> xyplot(y2 ~ x2)
See help(print.trellis), which has examples.
-Deepayan
_
On 6/22/07, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> Deepayan Sarkar wrote:
> > On 6/22/07, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> >> I am using R 2.4.0 and lattice to produce some xyplots conditioned on a
> >> factor and a shingle. The shingle me
or(unit = "npc")
if (!is.null(ll))
draw.key(simpleKey(dimnames(Titanic)$Survived,
rect = TRUE, points = FALSE),
vp = viewport(x = ll$x, y = ll$y),
draw = TRUE)
}
)
strip.default(which.given = 1,
which.panel = which.panel[which.given],
...)
})
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
On 6/22/07, Sébastien <[EMAIL PROTECTED]> wrote:
> Hi Deepayan,
>
> The following code creates a dummy dataset which has the same similar as
> my usual datasets. I did not try to implement the changes proposed by
> Hadley, hoping that a solution can be found using
though
> it appears in the result of table. Is there a possibility to get this
> bar too?
Please give a reproducible example, because it's not clear to me what
exactly is supposed to be NA.
-Deepayan
__
R-help@stat.math.ethz.ch mailing list
ht
try out some real code?
Just from your description, I would have suggested something like
xyplot(Observed + Predicted ~ Time | Individuals + Model,
data = mydata,
panel = panel.superpose.2, type = c("p", "l"),
layout = c(0, nlevels(mydata$Individuals)
>
> Any suggestions you can give (especially any not involving the source code
> of 'pairs') are most welcome.
Lattice gets you close:
xyplot(a + b + c ~ d + e + f, data = x, outer = TRUE,
scales = "free", layout = c(3, 3), aspect = 1)
The rest may or may not
change the order in which curves
> are plotted in each panel. I have tried reordering the
> levels in data$group:
>
> data$group<-factor(data$group,
> levels=c("CV_model_event_1","CV model event 2","CV
> event
> 1","CV_event_2","CV_event_
le2" "file3" ...
..$ : chr [1:29] "email1" "email10" "email11" "email12" ...
You need to read help(Extract) carefully and play around with some
simple examples.
> I don't understand why that produces
beta)),
strip.left =
strip.custom(horizontal = FALSE,
factor.levels =
expression(g[2]==gamma, g[2]==delta)))
Otherwise, you will really have to write a proper strip function that
calls strip.default() wit
gt; par(new=T) and label axis 4 with standard graphics. I've seen an example
> for doing something similar in xyplot even though Deepayan has indicated
> that lattice isn't the right tool for the job.
>
> However, is there a way to gracefully add a second y-axis to a xyplot
>
10)
y <- rnorm(10)
x + y
x - y
}
calling test() at the R prompt will only print x - y and not x + y, and so on.
This is all standard R behaviour. If you want something to be printed
irrespective of context, use print(), e.g.
print(x + y)
or
print(xyplot(y~x|z))
This is also men
> z <- sample(letters[1:4], 100, rep=T)
> library(lattice)
> bitmap("tst.png")
> xyplot(y~x|z)
> dev.off()
>
> and I source it, I get the tst.png file, which is a blank page.
>
> If I copy and paste instead, I get the correct plot.
>
> Any suggestion?
iginal (R argument semantics are call by value, not call by
reference). You are losing data$w in the local copy in your function,
but why would you care if you are not using it anyway.
Of course, if your formula contains a reference to 'w' then you will
get wrong results, so checking for
On 6/15/07, hadley wickham <[EMAIL PROTECTED]> wrote:
> On 6/15/07, Deepayan Sarkar <[EMAIL PROTECTED]> wrote:
[...]
> > By 'name', I mean a symbol, such as 'Age' or 'myweight'. So
> > basically, everything is as you would expect if the n
e confusing if it were the other way round).
With this in mind, either of the following might do what you want:
badFunction <- function(mydata, myformula) {
mydata$myweight <- abs(rnorm(nrow(mydata)))
hyp <-
rpart(myformula,
data=
coarse side on other occasions.
If you are mostly concerned about small figures, one possibility is
1. zoom out to a level where you're happy with the pixel resolution
2. do a screen capture using 'import'
3. use gimp (which has the same feature, with more units)
gim
panel.xyplot(x, y, ...)
fm <- lm(y ~ x)
panel.abline(reg = fm)
slope <- round(coef(fm)[2], 3)
message("Click on desired location")
panel.text(grid.locator("native"), lab = slope)
})
-Deepayan
_
subset of 'good' relevant for this panel
panel.lmline(x[good.id], y[good.id], col = "blue")
})
This also works if 'good' is globally visible and not in 'mydata'.
[...]
> 2) There are 5 dif
ol=c("red","green","blue","gray"))
The easiest way is to create a new factor with suitable levels: replace
groups=year
by
groups=year:variety
or the more verbose
groups=interaction(year, variety)
-Deepayan
_
> Error in pretty(rng, ...) : unused argument(s) (format.posixt = NULL)
This one is a bug in lattice (there is some code to support chron
objects, but evidently not many people use it). I will include a fix
in the next update.
-Deepayan
__
R-help@
1 - 100 of 902 matches
Mail list logo