[R] The R Journal, Volume 6, Issue 2

2015-01-31 Thread Deepayan Sarkar
Dear All, The latest issue of The R Journal is now available at http://journal.r-project.org/archive/2014-2/ Many thanks to all contributors. Regards, -Deepayan ___ r-annou...@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-announce

Re: [R] Access function as text from package by name

2018-09-28 Thread Deepayan Sarkar
On Fri, Sep 28, 2018 at 2:16 PM Bert Gunter wrote: > > Do you mean: > ?get Doesn't work with :: etc: > get("graphics::box") Error in get("graphics::box") : object 'graphics::box' not found I think parse()+eval() is pretty much unavoidable. After that, it's a choice between deparse() and print()

Re: [R] Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)

2018-10-05 Thread Deepayan Sarkar
On Fri, Oct 5, 2018 at 2:07 PM hmh wrote: > > On 05/10/2018 10:28, Annaert Jan wrote: > > you discard any time series structure; > But that is PRECISELY what a call a bug: > There should not be any "time series structure" in the output or rnorm, > runif and so on but there is one. > > rnorm(N,0,1)

Re: [R] Stratifying data with xyplot

2019-03-15 Thread Deepayan Sarkar
On Tue, Mar 12, 2019 at 2:28 AM Kevin Wright wrote: > > See the examples here: > https://www.stat.ubc.ca/~jenny/STAT545A/block10_latticeNittyGritty.html Excellent reference. The only improvement I could think of is to abuse the non-standard evaluation of 'groups' to avoid repeating the name of th

[R] The R Journal, Volume 6, Issue 1

2014-08-05 Thread Deepayan Sarkar
Dear All, The latest issue of The R Journal is now available at http://journal.r-project.org/archive/2014-1/ Many thanks to all contributors, and apologies for the delay. Regards, -Deepayan ___ r-annou...@r-project.org mailing list https://stat.ethz.c

Re: [R] barchart with bars attached to y=0-line

2008-07-16 Thread Deepayan Sarkar
On 7/16/08, Henning Wildhagen <[EMAIL PROTECTED]> wrote: > 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

Re: [R] Conditionally Updating Lattice Plots

2008-07-21 Thread Deepayan Sarkar
On 7/20/08, Bryan Hanson <[EMAIL PROTECTED]> wrote: > Hi All... > > I can¹t seem to find an answer to this in the help pages, archives, or > Deepayan¹s Lattice Book. > > I want to do a Lattice plot, and then update it, possibly more than once, > depending upon some logical options. Code below;

Re: [R] Lattice: How to draw curves from given formulae

2008-07-22 Thread Deepayan Sarkar
On 7/21/08, John Smith <[EMAIL PROTECTED]> wrote: > Dear R Users: > > I have a list function as: > Flat: y = 0 > Linear: y = -(1.65/8)d > Logistic: y = 0.015 - 1.73/{1+exp[1.2(4-d)]} > Umbrella: y= -(1.65/3)d + (1.65/36)d^2 > Emax: y = -1.81d/(0.79+d) > Sigmoid Emax: y = -1.70d^5/(4^5+d^5)

Re: [R] Lattice: How to draw curves from given formulae

2008-07-22 Thread Deepayan Sarkar
eepayan > > Thanks > > > > On Tue, Jul 22, 2008 at 1:08 PM, Deepayan Sarkar <[EMAIL PROTECTED]> > wrote: > > > > On 7/21/08, John Smith <[EMAIL PROTECTED]> wrote: > > > Dear R Users: > > > > > > I have a list f

Re: [R] Lattice wireframe: How to avoid drawing lines around polygons when using shade=TRUE

2008-07-30 Thread Deepayan Sarkar
On Sun, Jul 27, 2008 at 1:41 AM, Oliver M. Haynold <[EMAIL PROTECTED]> wrote: > On Sun, 27 Jul 2008 05:00:48 +, Oliver M. Haynold wrote: >> I am using wireframe from the lattice package, with the shade option set >> to TRUE. When I output to PDF or Postscript, a line gets drawn around >> each

Re: [R] Unexpected line type in lattice plot key on pdf device

2008-07-30 Thread Deepayan Sarkar
On Wed, Jul 30, 2008 at 6:41 AM, G. Draisma <[EMAIL PROTECTED]> wrote: > L.S., > With the code below, > on the Windows screen the line types in the key show > as solid and dashed as in the graph, > and in the pdf file they show > as solid in the key and solid and dashed in the graph. > I would no

Re: [R] strip names lattice graphics

2008-07-31 Thread Deepayan Sarkar
On Thu, Jul 31, 2008 at 1:30 PM, GOUACHE David <[EMAIL PROTECTED]> wrote: > R-helpers, > > I'm having difficulty with customizing strip names for a lattice graphic. > > Here is an example using the iris data set : > > xyplot(Sepal.Length+Sepal.Width~Petal.Length,groups=Species,data=iris) > > ## I'd

Re: [R] bwplot with Date object

2008-07-31 Thread Deepayan Sarkar
On Thu, Jul 31, 2008 at 12:54 PM, GOUACHE David <[EMAIL PROTECTED]> wrote: > Hello R-helpers, > > I would like to produce a boxplot for dates, using lattice. > > Here is a dummy example : > > dates<-as.Date(32768:32895,origin="1900-01-01") > plouf<-data.frame(days=dates,group=factor(rep(1:2,times=1

Re: [R] xyplot strip=function for two conditioning variables

2008-08-04 Thread Deepayan Sarkar
On Mon, Aug 4, 2008 at 3:36 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Checkout this one: > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/82452.html And there's a wrapper for this in the latticeExtra package: library(latticeExtra) useOuterStrips(xyplot(data=df, copies~week|Treatment+

Re: [R] subset inside a lattice plot using panel.lines

2008-08-04 Thread Deepayan Sarkar
On Mon, Aug 4, 2008 at 8:44 AM, Mark Difford <[EMAIL PROTECTED]> wrote: > > Hi Michael, > >>> Pulling my hair out here trying to get something very simple to work. ... > > I can't quite see what you are trying to do [and I am not sure that you > clearly state it], but you could make things easier a

Re: [R] Lattice: How to draw curves from given formulae

2008-08-04 Thread Deepayan Sarkar
On Mon, Aug 4, 2008 at 1:39 PM, John Smith <[EMAIL PROTECTED]> wrote: > I have another questions. How can I type specific names into strips of the > resulting plot? > > For instance, in the resulting figure from the attached code, instead of > 'umbrella(d)', I want have 'UMBRELLA' in the strip. > >

Re: [R] xyplot strip=function for two conditioning variables

2008-08-05 Thread Deepayan Sarkar
On 8/5/08, Henning Wildhagen <[EMAIL PROTECTED]> wrote: > > Dear Deepayan, > > thanks for the hint with the wrapper in latticeExtra, it is very convenient > and the plot looks fine. Just from intuition i think that it would look even > nicer if the strips at the left side appear at the right site

Re: [R] request for fine panel axis controls in lattice

2008-08-05 Thread Deepayan Sarkar
On 8/5/08, Chuck Cleland <[EMAIL PROTECTED]> wrote: > On 8/5/2008 8:37 AM, Chosid, David (FWE) wrote: > > > I'm trying to use fine axis controls in lattice for each panel. > > Specifically, within each panel, I want to set the limits for x and y > > equal to each other since it is paired data (usin

Re: [R] Labeling lines in xyplot

2008-08-05 Thread Deepayan Sarkar
On Tue, Aug 5, 2008 at 11:15 AM, John Poulsen <[EMAIL PROTECTED]> wrote: > Hello, > > I apologize in advance as this example seems really elementary. Below I > have created a simple scatterplot with lines. I would like to label each > line with the name of the village, instead of using a legend.

Re: [R] xyplot key issue - line colors

2008-08-05 Thread Deepayan Sarkar
On Tue, Aug 5, 2008 at 1:53 AM, Karin Lagesen <[EMAIL PROTECTED]> wrote: > > > I have a problem regarding the colors assigned to the lines in the key > to an xy plot. I specify the plot like this: > > xyplot(numbers~sqrt(breaks)|moltype+disttype, groups = type, data = alldata, > layout = c(3,2

Re: [R] lattice: add vertical lines in xyplot

2008-08-07 Thread Deepayan Sarkar
On Thu, Aug 7, 2008 at 11:54 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: > Hi list, > > This is a very basic question about lattice: I wish to add some vertical > lines in each panel of a xyplot as demonstrated in this example: > >> library(lattice) >> >> xx <- seq(1, 10, length=100) >> x <- rep

Re: [R] panel.arrows problem in custom panel function

2008-08-07 Thread Deepayan Sarkar
On Thu, Aug 7, 2008 at 7:55 AM, Gavin Simpson <[EMAIL PROTECTED]> wrote: > 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 c

Re: [R] Polygon issue in lattice & Bivariate density estimation

2008-08-08 Thread Deepayan Sarkar
On Fri, Aug 8, 2008 at 7:40 AM, Andrewjohnclose <[EMAIL PROTECTED]> wrote: > > Dear all, > > I am trying to set a specific bandwidth for a bivariate kernel density > estimation and then plot it in lattice: managed all that except that the > plot appears to have an issue regards the setting of the p

Re: [R] Lattice: regression lines within grouped xyplot panels

2008-08-08 Thread Deepayan Sarkar
On Fri, Aug 8, 2008 at 2:38 PM, Rainer Hurling <[EMAIL PROTECTED]> wrote: > Dear community, > > I am looking for a possibility to draw 'regression lines' instead of > 'smooth' lines in grouped xyplots. The following code should give you a > small example of the data structure. > > > library(lattice

Re: [R] Lattice: problem using panel.superpose and panel.groups

2008-08-18 Thread Deepayan Sarkar
On Sun, Aug 17, 2008 at 2:36 AM, Dieter Menne <[EMAIL PROTECTED]> wrote: > Michael Braun MIT.EDU> writes: > >> >> Dieter: >> >> Thank you for your response. As you requested, I created a self- >> running example, pasted below. It may be a little wordier than I >> would like, but it runs. > > ..

Re: [R] inner margins for lattice

2008-08-22 Thread Deepayan Sarkar
On Fri, Aug 22, 2008 at 11:28 AM, Todd Hatfield <[EMAIL PROTECTED]> wrote: > I would like to control the inner margins of a lattice graph. The graph is > a single superposed panel, but there is too much white space around the data > for my liking. I've played around with some of the layout option

Re: [R] Two envelopes problem

2008-08-25 Thread Deepayan Sarkar
On Mon, Aug 25, 2008 at 1:51 PM, Mario <[EMAIL PROTECTED]> wrote: > No, no, no. I have solved the Monty Hall problem and the Girl's problem and > this is quite different. Imagine this, I get the envelope and I open it and > it has £A (A=10 or any other amount it doesn't matter), a third friend gets

Re: [R] lattice : using both strip and strip.left

2008-08-25 Thread Deepayan Sarkar
On Mon, Aug 25, 2008 at 4:47 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: > Dear all, > > > I'm routinely using lattice and ggplot2, I wish to create a lattice theme > that looks not too dissimilar to ggplot's defaults so I can include both > graphs in a document with a consistent look. > > To il

Re: [R] lattice: plotting an arbitrary number of panels, defining arbitrary groups

2008-08-26 Thread Deepayan Sarkar
On Tue, Aug 26, 2008 at 2:26 PM, Alex Karner <[EMAIL PROTECTED]> wrote: > R Friends, > > I'm running R2.7.1 on Windows XP. > > I'm trying to get some lattice functionality which I have not seen > previously documented--I'd like to plot the exact same data in multiple > panels but changing the group

Re: [R] lattice: plotting an arbitrary number of panels, defining arbitrary groups

2008-08-27 Thread Deepayan Sarkar
On Tue, Aug 26, 2008 at 6:56 PM, Alex Karner <[EMAIL PROTECTED]> wrote: > Thanks Deepayan, works like a charm. > > A followup question though--I'd like to produce the same data on four > panels with the final two "zoomed in", i.e. plotted with shorter x and > y axes. Since I can't access panel.numb

Re: [R] error in packet 1

2008-08-28 Thread Deepayan Sarkar
On Thu, Aug 28, 2008 at 3:07 AM, Giovanni Tarquinio <[EMAIL PROTECTED]> wrote: > Hello, > I'm Giovanni from ROMA.. > > I can't find a solution for the error: > > "error using packet 1 > the y field is not specified and it has not a default value" > (this is my traslation from italian language) > >

Re: [R] hex2RGB back to hex not the same?

2008-08-28 Thread Deepayan Sarkar
On Thu, Aug 28, 2008 at 1:07 PM, Aaron Mackey <[EMAIL PROTECTED]> wrote: > Witness this oddity (to me): > >> rainbow_hcl(10)[1] > [1] "#E18E9E" >> d <- attributes(hex2RGB(rainbow_hcl(10)))$coords[1,] >> rgb(d[1], d[2], d[3]) > [1] "#C54D5F" > > What happened? FYI, this came up as I'm trying to reu

Re: [R] drop.unused.levels for two factors {lattice}

2008-08-28 Thread Deepayan Sarkar
On Thu, Aug 28, 2008 at 1:21 PM, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any way to suppress plotting of panels that don't actually contain > any information? I have tried using 'drop.unused.levels=TRUE', but there > doesn't seem to be any effect. Here is an example: > > libra

Re: [R] npc to native coordinates for xyplot

2008-09-01 Thread Deepayan Sarkar
On 9/1/08, Jason Pare <[EMAIL PROTECTED]> wrote: > Hello, > > I am having trouble adding symbols to grid graphics. I am able to > create a lattice scatterplot using xyplot, which has a range from > -15:15 in both the X and Y directions. However, when I try to add > circles and text to this grap

Re: [R] two lattice graphs in one object

2008-09-02 Thread Deepayan Sarkar
On Tue, Sep 2, 2008 at 6:24 AM, Andreas Krause <[EMAIL PROTECTED]> wrote: > > When I create a lattice/Trellis type graph, I typically write a function that > returns the graph, as in > do.graph <- function(x, y, ...) > { >require(lattice) >return(xyplot(y~x, ...)) > } > > My question tod

Re: [R] annotating individual panels produced by xyplot

2008-09-02 Thread Deepayan Sarkar
On Tue, Sep 2, 2008 at 1:23 PM, Martin Brown <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm new to R and lattice and panel functions. I've produced a lattice > graph using xyplot. Now I would like to add various, and *different*, > annotations to each individual panel. I tried something like this,

Re: [R] lattice command equivalent to points

2008-09-02 Thread Deepayan Sarkar
On 9/2/08, Steven McKinney <[EMAIL PROTECTED]> wrote: > > > This is close, but maybe not optimal lattice coding. > I haven't yet figured out how to suppress the x axis > labeling. > > bwplot(yield ~ 1|year, panel = function(x, y, ...){panel.bwplot(x, y, ..., > pch = "|"); panel.points(x, mean(

Re: [R] two lattice graphs in one object

2008-09-03 Thread Deepayan Sarkar
On Tue, Sep 2, 2008 at 11:43 PM, Andreas Krause <[EMAIL PROTECTED]> wrote: > Deepayan, > > that is exactly what I was hoping for. Thanks much! > > Experimenting with it I noticed that updating two existing objects with plot > arguments seems to not work, at least not in this way: > > gr1 <-xyplot(

Re: [R] lattice: simultaneously control aspect & outer whitespace

2009-08-09 Thread Deepayan Sarkar
On 8/7/09, Jacob Wegelin wrote: > Suppose we wish to achieve the following three aims: > (1) Control the aspect ratio of our plot (i.e., tweak this till it looks > great) > > (2) Save the plot as a PDF with zero or minimal white space outside it. > > (3) Preserve this in code, so that in the f

Re: [R] multiple lty on same panel in xyplot

2009-08-09 Thread Deepayan Sarkar
On 8/7/09, Duncan Mackay wrote: > Hi RUsers > > I like to keep the plots self contained and avoid changing the current > device parameters by using the par.settings. > To see what I could achieve by using par settings I tried the following and > several variants but could not get black points. >

Re: [R] R help from command line

2009-08-11 Thread Deepayan Sarkar
On Tue, Aug 11, 2009 at 12:43 PM, Peng Yu wrote: > Hi, > > I frequently need to open multiple help pages in R, which requires the > start of multiple R sessions. I am wondering if there is a way to > invoke the help page from the command line just like 'man'. If you are feeling adventurous, you mi

Re: [R] Varying x-axis labels in lattice

2009-08-11 Thread Deepayan Sarkar
On Tue, Aug 11, 2009 at 6:30 AM, Frank E Harrell Jr wrote: > Dear Group: > > I want to use lattice with a formula such as y ~ x | v to plot a data frame > in which v varies to indicate which "x" is really being plotted. I know how > to make the x-axis scales vary with the panel but is it possible t

Re: [R] How to plot 3-D surface graph from lmer mixed models?

2009-08-13 Thread Deepayan Sarkar
On Thu, Aug 13, 2009 at 6:34 AM, willow1980 wrote: > > Dear Professor Murdoch, > That is exactly the difficulty for me. I don't know how to make a prediction > with lmer using "expand.grid"; at the moment, I can use > “mo...@x%*%fixef(model)” to get predicted values for existing observational > dat

Re: [R] SOLVED: Lattice: How to do error bars

2009-08-13 Thread Deepayan Sarkar
On Wed, Aug 12, 2009 at 7:19 AM, wrote: > Thank you Gerrit, > > Your suggestion proved right after all: > > This does put error bars (dy) on the points. You only need to figure out > the proper y axis scaling. > >> xyplot(y~x|f,data=xy,groups=dy,panel=function(x,y,groups,subscripts,...) > {panel.x

Re: [R] xyplot and subscripts

2009-08-13 Thread Deepayan Sarkar
On Thu, Aug 6, 2009 at 7:27 AM, Kito Palaxou wrote: > > Hi all, > > I have a data frame like this: > > DF <- data.frame(x = rnorm(10), y = rnorm(10), gr = rep(1:5, 2)) > > and I make the following xy-plot: > > library(lattice) > xyplot(y ~ x, data = DF, groups = gr, type = "b", col = 1) > > > Is it

Re: [R] Retrieving x argument name from a trellis object

2009-08-14 Thread Deepayan Sarkar
--- > Vincenzo Luca Di Iorio > Consultant PME User support - GSK R&D Limited > --- > > > > "Deepayan Sarkar" > > 12-Nov-2008 07:04 > >

Re: [R] adding points to a wireframe

2009-08-22 Thread Deepayan Sarkar
On 8/18/09, Jarrett Byrnes wrote: > A quick question. I'm trying to plot a surface from a fitted model along > with the original points, as in the following example: > > > df<-data.frame(expand.grid(100*runif(1:100), > 100*runif(1:100))) > df$Var3<-rnorm(length(df$Var1), mean=df$Var1*df$Var2, >

Re: [R] Lattice: How to do error bars

2009-08-22 Thread Deepayan Sarkar
On 8/11/09, Alex van der Spek wrote: > I am trying to add 2 stdev error bars to lattice type plots: > > panel.ebar<-function(x,y,dy=NULL,...) { > panel.xyplot(x,y,...) > panel.segments(x,y-dy,x,y+dy,...) > } > > Then: > > xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar) > >

Re: [R] Surpress one panel in lattice plot..?

2009-08-25 Thread Deepayan Sarkar
On Sun, Aug 23, 2009 at 5:41 PM, Ben Bolker wrote: > > > > Fredrik Karlsson wrote: >> >> Dear list, >> >> I have a two character vector with two different values in them (two >> each, that is). Naturally, when I use these vectors as grouping >> factors in a lattice plot, I get four panels. >> Now,

Re: [R] adding points to a wireframe

2009-08-25 Thread Deepayan Sarkar
On Mon, Aug 24, 2009 at 4:27 PM, jebyrnes wrote: > > Hrm.  I have to admit, I don't entirely understand how to use the scaling, > and that seems like a lot of unneeded extra code.  It is what it is, though. That's true, and I think it would be easy enough to have a flag to panel.3dscatter etc. tel

Re: [R] allowing line wrap for long strip text in xyplot (lattice)

2009-08-25 Thread Deepayan Sarkar
On Mon, Aug 24, 2009 at 8:04 PM, Donald Boyd wrote: > Hi. Am brand new to R and to mailing lists - have never posted anywhere > before, so hope I do this right. > > Am using R 2.9.1 with lattice graphics (just installed, fully up to date). > > Am doing trellis xyplot with y (emp=employment), x (yea

Re: [R] table, xyplot, names, & loops

2009-08-25 Thread Deepayan Sarkar
On Tue, Aug 25, 2009 at 10:16 AM, w_poet wrote: > > Hi R community, > > I'm just starting out in R and have a basic question about xyplot and > tables. Suppose I had a table of data with the following names: Height, > Age_group, City. I'd like to plot mean Height vs Age_group for each City. > > Whe

Re: [R] Google's R Style Guide

2009-08-28 Thread Deepayan Sarkar
On Fri, Aug 28, 2009 at 10:02 AM, Kevin Wright wrote: > On Fri, Aug 28, 2009 at 11:49 AM, Duncan Murdoch wrote: > >> On 8/28/2009 12:33 PM, Kevin Wright wrote: [...] >> Now that doesn't sound like the browser.  Whatever debugger you are using >> has a bug. >> >> Duncan Murdoch >> >> > Ah, right y

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-04 Thread Deepayan Sarkar
On Fri, Sep 4, 2009 at 8:28 AM, Paul Sweeting wrote: > Hi > > Well, I think the title says it all!  I've looked through the documentation > but I can't find a way of doing this.  The situation is that I have 4 series, > say a, b, c and d.  Series a and c are plotted on the lh y axis, series b and

Re: [R] Matrix as input to xyplot {lattice} - proper extended formula syntax

2009-09-06 Thread Deepayan Sarkar
On Sat, Sep 5, 2009 at 10:43 PM, Bryan Hanson wrote: > Thanks David, your way of constructing df is much more compact than what I > was using, so I've incorporated it.  I also had my rows and columns > transposed relative to how xyplot wanted them (though I had tested for that, > other problems int

Re: [R] Xyplot, multi line title via main, all lines left justified

2009-09-10 Thread Deepayan Sarkar
On Wed, Sep 9, 2009 at 2:53 PM, Afshartous, David wrote: > > All, > > Below is an xyplot plot with multiple panels and a title produced via main: > > library("lattic") > data.ex = data.frame(y = rnorm(10), t = rep(1:5, 2), group = rep(c(0,1), > each = 5)) > > xyplot(y ~ t | as.factor(group), data

Re: [R] symbols(x,y, circles=sqrt(N)) with lattice xyplot

2009-09-14 Thread Deepayan Sarkar
On Mon, Sep 14, 2009 at 3:55 PM, Jacob Wegelin wrote: > How would I create the following plot using lattice? > > symbols( combPsummary$pastRate, combPsummary$finRate, > circles=sqrt(combPsummary$N) ) > > The idea is to plot finRate vs pastRate using circles whose areas are > proportional to the nu

Re: [R] lattice/ylim: how to fix ylim[1], but have ylim[2] dynamically calculated?

2010-02-14 Thread Deepayan Sarkar
On Sun, Feb 14, 2010 at 7:33 AM, Johannes Graumann wrote: > 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.barcha

Re: [R] Lattice: How to implement "varwidth" analogous to "graphics::boxplot" in "bwplot"?

2010-02-15 Thread Deepayan Sarkar
On Mon, Feb 15, 2010 at 1:56 PM, Johannes Graumann wrote: > Johannes Graumann wrote: > >> Has anybody solved this? > > For the benefit of others: after studying >        > ?panel.bwplot > I have to admit that >        > bwplot(..., varwidth = TRUE) > solves the issue. It's just not documented at >

Re: [R] dot-dot-dot as an actual argument

2010-02-19 Thread Deepayan Sarkar
On Fri, Feb 19, 2010 at 4:44 AM, Paul Hiemstra wrote: > Jyotirmoy Bhattacharya wrote: >> >> I could not find any documentation of how dot-dot-dot works when used >> as an argument in a function call (rather than as a formal argument in >> a definition). I would appreciate some references to the ru

Re: [R] Updating a hexbinplot

2010-02-25 Thread Deepayan Sarkar
On Thu, Feb 25, 2010 at 1:24 AM, Marcin Kozak wrote: > Dear all, > > Considering this simple example of hexbinplot: > mixdata <- >     data.frame(x = c(rnorm(5000), rnorm(5000,4,1.5)), >                y = c(rnorm(5000), rnorm(5000,2,3)), >                a = gl(2, 5000)) > fig <- hexbinplot(y ~ x

Re: [R] Adjust lattice graph axis label on final page

2010-02-26 Thread Deepayan Sarkar
On Thu, Feb 25, 2010 at 3:45 AM, Sebastien Bihorel wrote: > Dear R-users, > > I was wondering if there was a way to adjust the placement of the axis > titles for the last page of a multi-page lattice plot (see example below). > Depending on the total number of panels, the placement of these titles

Re: [R] bwplot() {lattice}

2010-02-26 Thread Deepayan Sarkar
On Fri, Feb 26, 2010 at 8:30 AM, Peng Cai wrote: > Hi All, > > I'm trying to plot boxplot graph. I tried barchart with "groups=" option and > it worked fine. But when I try to generate same kind of graph using > bwplot(), "groups=" option doesn't seem to work. Though this works, > > yield ~ variet

Re: [R] Adjust lattice graph axis label on final page

2010-02-26 Thread Deepayan Sarkar
8, rather than creating two > graphs with different layouts? Sure: p <- xyplot(y~x|id,as.table=T,data=mydata) update(p[1:6], layout = c(2, 3)) update(p[7:8], layout = c(2, 1)) -Deepayan > > Sebastien > > Deepayan Sarkar wrote: >> >> On Thu, Feb 25, 2010 at 3:45 AM, S

Re: [R] bwplot() {lattice}

2010-02-28 Thread Deepayan Sarkar
e) > bwplot(yield ~ variety, data = barley, col = 1, pch = 16, >       panel = panel.superpose, panel.groups = panel.bwplot, >   auto.key=list(space="right"), >   groups = year, scales=(x=list(rot=45))) > > Thanks, > Peng > > On Fri, Feb 26, 2010 at 3:51 AM

Re: [R] bwplot with pch = "|"

2010-03-02 Thread Deepayan Sarkar
On Mon, Mar 1, 2010 at 10:49 AM, Duncan Mackay wrote: > Dear All > > Below is a toy example of a modified standard bwplot. > > require(lattice) > DF <- > data.frame(site = rep(1:5, each = 20), >           height = rnorm(100)) > > bwplot(site ~ height,DF, > pch = "|", > par.settings = list(strip.ba

Re: [R] conditioning variable in panel.xyplot?

2010-03-04 Thread Deepayan Sarkar
On Thu, Mar 4, 2010 at 4:42 PM, Seth W Bigelow wrote: > I wish to create a multipanel plot (map) from several datasets ("d" and > "q" in the example below). I can condition the main xyplot statement on > the "site" variable, but I don't know how to pass a conditioning variable > to panel.xyplot pl

Re: [R] conditioning variable in panel.xyplot?

2010-03-05 Thread Deepayan Sarkar
On Fri, Mar 5, 2010 at 12:45 PM, Seth W Bigelow wrote: > I'm stumped after an hour or so reading about subscripts in panel.xyplot. > Apparently the panel function is executed for each subset of data in the > main dataset (specified by the conditioning variable, 'site' in my > example), and the 'su

Re: [R] How to create a line and bar panel chart with two different axes?

2010-03-05 Thread Deepayan Sarkar
On Wed, Mar 3, 2010 at 12:35 PM, DougNiu wrote: > > I need to create a line and bar panel chart with two different axes. I tried > in lattice but couldn't get it worked. Here is my code: > > data(barley) > barchart(yield ~ variety | site, data = barley, >              groups = year, layout = c(1,6

Re: [R] Screen settings for point of view in lattice and misc3d

2010-03-05 Thread Deepayan Sarkar
On Wed, Mar 3, 2010 at 1:22 PM, Waichler, Scott R wrote: > I'm making some 3D plots with contour3d from misc3d and wireframe from > lattice.  I want to view them from below; i.e. the negative z-axis.  I can't > figure out how to do so.  I would like my point of view looking up from > below, wit

Re: [R] Adding text outside (lattice barchart) plotting region.

2010-03-18 Thread Deepayan Sarkar
On Thu, Mar 18, 2010 at 5:26 AM, Peng Cai wrote: > Thanks Richard and Jim for your reply! > > @All: > > Is there a way to do this without altering default x-labels (because in my > case there could be up to 30-40 x-labels and I may have to repeat the script > multiple times with different x-lables

Re: [R] One main title and One legend for multiple lattice plots

2010-03-19 Thread Deepayan Sarkar
On Fri, Mar 19, 2010 at 8:37 AM, Kim Jung Hwa wrote: > Hi David, > > Thank you for your reply. I'm sorry if I've misconveyed my question: here it > goes again: > > *** I want a common "main title" and a common "legend" after I > output/print four different lattice plots on a single .wmf or .pdf fi

Re: [R] panel.text and saving to pdf

2009-06-26 Thread Deepayan Sarkar
On Fri, Jun 26, 2009 at 1:53 AM, Dieter Menne wrote: > Willem Vervoort usyd.edu.au> writes: > >> I am not sure what I am doing wrong, but I have some unexplained behaviour > when saving a lattice graph >> including text to a pdf file. The text seems to move around. It must have > something to do w

Re: [R] another xyplot question

2009-07-02 Thread Deepayan Sarkar
On Wed, Jul 1, 2009 at 10:38 PM, jlfmssm wrote: > I have a data set like this > > ID=c("A","A","A","A","A","A","A","B","B","B","B","B","B","B") > s=c(1.1,2.2,1.3,1.1,3.1,4.1,4.2,1.1,2.2,1.3,1.1,3.1,4.1,4.2) > d=c(1,2,3,4,5,6,7,1,2,3,4,5,6,7) > t=c(-3,-1,0,1,2,3,4,-3,-2,-1,0,1,2,3) > > mydata<-data.

Re: [R] Getting identify() to work with lattice::cloud()

2009-07-02 Thread Deepayan Sarkar
On Thu, Jul 2, 2009 at 10:11 AM, Robert A. LaBudde wrote: > I don't seem to be able to put any syntax into identify() that gets it to > work with "lattice" cloud() graph: > > layout(1) > require('lattice') > cloud(g3 ~ g1 + g2, data=gapp, col = "blue", >  xlab='G1 Score', ylab='G2 Score', >  zlab='

Re: [R] Two questions about the cloud function in the lattice package

2009-07-03 Thread Deepayan Sarkar
On Fri, Jul 3, 2009 at 10:02 AM, Martin Eklund wrote: > Hi, > > I have two questions regarding the cloud function in the lattice > package: > > 1) Is there a way to not print the surrounding frame (i.e. the square > surrounding the entire plot)? There is an example in the cloud help page that show

Re: [R] Variable names in lattice XY-plot

2009-07-03 Thread Deepayan Sarkar
On Fri, Jul 3, 2009 at 1:02 PM, baptiste auguie wrote: > ?strip.custom > > > p <- > xyplot(acet+chol+ino+acetp ~ zp, > group=grp, > data=data, > type="l", > scales=list(relation="free"), > auto.key=list(title=" >> >> Neurotransmitters", border=TRUE)) > > > > update(p, strip

Re: [R] How to re-order panels and y-axis values in trellis display using lattice

2009-07-08 Thread Deepayan Sarkar
On Tue, Jul 7, 2009 at 3:03 PM, wrote: > Hi, > > I have been trying to re-order several items in a trellised barchart > display in lattice, but can't seem to figure it out. > > ###sample code, Stage and Colony have 2 and 3 levels respectively. > > barchart(Activity ~ Percent | Stage + Colony, data

Re: [R] how to change the "quantile" method in bwplot

2009-07-21 Thread Deepayan Sarkar
On Tue, Jul 21, 2009 at 7:47 AM, Jun Shen wrote: > Uwe, > > Thank you for your reply.  I am still not very clear about the meanings of > the arguments in the stats function.   To make it clearer, quantile() uses > type=7 as default method. I believe this is the method bwplot() uses to > calculate t

Re: [R] xyplot, panel.abline, from, to

2009-07-28 Thread Deepayan Sarkar
On Tue, Jul 28, 2009 at 6:58 AM, Peter Ehlers wrote: > David, > ?panel.abline does not indicate that 'from/to' are arguments to > that function. If you read the help page carefully, you'll see > that 'from/to' apply to panel.curve(). Perhaps you thought that > the '...' argument can take 'from/to';

Re: [R] xyplot: superpose 2 time series with different time intervals

2009-08-01 Thread Deepayan Sarkar
On Sat, Aug 1, 2009 at 7:26 AM, Gary Lewis wrote: > I could use some advice regarding xyplot. > > I've got 2 time series. Both cover approximately the same period of > time (ie, 1940 to 2009). But one series has annual data and the other > has monthly data. One refers to university enrollment; the

Re: [R] Lattice xyplot: same scales within one factor

2009-08-03 Thread Deepayan Sarkar
On Mon, Jul 13, 2009 at 8:33 AM, OB wrote: > I am using R 2.8.1 and lattice to produce xyplots conditioned on > two factors. What I would like is to have the scales be free between values > of one factor, but some within. Thus, in this example, > > xyplot(mpg ~ disp | factor(gear) + factor(cyl), mt

Re: [R] dot plot with several points for 2 categories

2009-08-03 Thread Deepayan Sarkar
On Wed, Jul 29, 2009 at 9:11 AM, jaregi wrote: > > Hi Michael, Steve, and 1Rnwb, > > I'm very impressed by the quick replies on the mailer. Thanks a lot for your > suggestions. They worked very well. > > In general, I have to say that I'm a bit disappointed that in R, like in > Excel, one basically

Re: [R] lattice shingle plot axis annotation

2009-08-03 Thread Deepayan Sarkar
On Thu, Jul 30, 2009 at 12:43 AM, Armin Goralczyk wrote: > Hello (R-)Experts > > I hope someone can help with this problem concerning axis annotation > of a lattice shingle plot. I want a plot with three shingles to > display some laboratory value over time. In the first panel over the > first few

Re: [R] Defining different objects within a loop

2009-08-03 Thread Deepayan Sarkar
On Thu, Jul 30, 2009 at 3:09 PM, jimdare wrote: > > Dear R Users, > > I have a dataset that I have split by group.  For each group I plot a figure > using: > > for (i in splitdf){ > plot<-xyplot() > print(plot) > savePlot(filename=paste(i$Group[1]),type="pdf") > } > > This gives me

Re: [R] wireframe color

2009-08-03 Thread Deepayan Sarkar
On Mon, Aug 3, 2009 at 9:36 AM, Marlin Keith Cox wrote: > Hello, hopefully simple question, but I cannot find the answer.  I need to > change the color from the standard default.  Still want the scaled colors, > but need different colors for different graphs. > > Code is: > > wireframe(z ~ y*x, mat

Re: [R] Completion for custom "$" operator?

2009-08-04 Thread Deepayan Sarkar
On Tue, Aug 4, 2009 at 11:37 AM, Vitalie S. wrote: > Dear UseRs, > > I declared a `$` method for a S4 class. Can I have ab automatic completion > for this operator in R? Lists and environment objects provide this feature > by default, but my object is an extension of "function" class which does not

Re: [R] Transparency and trellis device

2009-08-05 Thread Deepayan Sarkar
On 8/5/09, pomc...@free.fr wrote: > Just replying to bring back some attention on my post, which might have slept > through on Saturday. > > Thank you for your help. > > > - Mail Original - > De: pomc...@free.fr > À: r-h...@stat.math.ethz.ch > Envoyé: Samedi 1 Août 2009 15h48:24 GMT -

Re: [R] Transparency and trellis device

2009-08-05 Thread Deepayan Sarkar
On 8/5/09, pomc...@free.fr wrote: > Hi Deepayan, > > Thank for you reply. > I am a little bit confused now. In the one hand, the trellis.device function > has lost his bg argument as explained in the Note section of ?trellis.device, > but the background info provided by a theme does not seem t

Re: [R] multiple lty on same panel in xyplot

2009-08-05 Thread Deepayan Sarkar
On 8/5/09, Jacob Wegelin wrote: > I would like to use lattice graphics to plot multiple functions (or groups > or subpopulations) on the same plot region, using different line types "lty" > or colors "col" to distinguish the functions (or groups). > > In traditional graphics, this seems straigh

Re: [R] multiple lty on same panel in xyplot

2009-08-05 Thread Deepayan Sarkar
On Wed, Aug 5, 2009 at 2:24 PM, Jacob Wegelin wrote: > On Wed, 5 Aug 2009, Deepayan Sarkar wrote: > >> On 8/5/09, Jacob Wegelin wrote: >>> I would like to use lattice graphics to plot multiple functions (or > groups >>>  or subpopulations) on the same plot r

Re: [R] specify lattice black-and-white theme

2009-08-05 Thread Deepayan Sarkar
On Wed, Aug 5, 2009 at 6:27 PM, Jacob Wegelin wrote: > Is there a simple way to specify a theme or trellis (lattice) parameters so > that, in a multipanel (conditioned) plot, there is no color and in the > strips there is no shading? This is the effect achieved on page 124 of > Deepayan Sarkar's "L

Re: [R] Completion for custom "$" operator?

2009-08-06 Thread Deepayan Sarkar
On Thu, Aug 6, 2009 at 10:45 AM, Vitalie S. wrote: > >> >> Completion should be automatic if you define names() to return the valid >> names. > > Thank you Deepayan, that works beautifully. I wonder though; names function > for environment objects always returns NULL, but completion still works. >

Re: [R] Completion for custom "$" operator?

2009-08-07 Thread Deepayan Sarkar
On 8/7/09, Romain Francois wrote: > On 08/04/2009 10:02 PM, Deepayan Sarkar wrote: > > > On Tue, Aug 4, 2009 at 11:37 AM, Vitalie S. wrote: > > > > > Dear UseRs, > > > > > > I declared a `$` method for a S4 class. Can I have ab automatic > co

Re: [R] lattice dotplot: line height for multi-line labels

2009-08-07 Thread Deepayan Sarkar
On 8/7/09, boris.vasil...@forces.gc.ca wrote: > Dear R-users, > > I am looking for suggestions on how to control the line-height for > multi-line labels in lattice dotplot. > > In particular, in the dotplot produced by > > library(lattice) > aa <- c('A'=10,'B\nb'=20,'C'=30) > dotplot(aa) > >

Re: [R] Is there a 'vi' mode in R?

2009-08-07 Thread Deepayan Sarkar
On 8/6/09, Peng Yu wrote: > Hi, > > I'm wondering if R provide a vi mode in the command line just like > other shells such as bash do. Can somebody let me know? I've never used vi-mode, but vi mode in bash (at least) is provided by the readline library, and R uses the same library. If you set u

Re: [R] using reorder in dotplot

2010-03-26 Thread Deepayan Sarkar
On Tue, Mar 23, 2010 at 7:21 AM, Veerappa Chetty wrote: > Hi, > Please help to correct my error in the following. I want to plot the values > of 'x" in increasing order. > --- > library(lattice) > Name<-c("A","B","C") > x<-c(15,20,10) > test<-data.frame(Name,x) > do

Re: [R] Add title to color spectrum legend in xyplot

2010-03-26 Thread Deepayan Sarkar
On Tue, Mar 23, 2010 at 4:28 AM, Nick Ackerman wrote: > > Hi, > > I have a plot that is essentially the same as that in Figure 5.6 of "Lattice > - Multivariate Data Visualization with R". The key difference is that I > would like to add a title to top of the grey color spectrum legend, but have >

Re: [R] How can I make a lattice::levelplot block size uniform

2010-03-26 Thread Deepayan Sarkar
On Fri, Mar 26, 2010 at 7:03 AM, Lao Tse wrote: > Dear lattice::levelplot users, > > I would like to use levelplot to plot uniformly sized blocks. > > Here is an example: > > require (lattice) > u = runif(10) * 10 > v = runif(10) * 10 > z = runif(10) > levelplot ( z ~ u + v, aspect="iso" ) > > The

Re: [R] 3 levelplots and 1 colorbar

2010-03-26 Thread Deepayan Sarkar
On Fri, Mar 26, 2010 at 12:46 AM, Joaquin Rapela wrote: > > I want to create a simple plot containing three levelplots with one colorbar. > I used the "Three levelplots" code below, but the third levelplot is drawn > smaller than the first two. However, if I try the "Two levelplots" code below > i

  1   2   3   4   5   6   7   8   >