Re: [R] panel.xyplot : incorrectly "connecting" points

2006-01-25 Thread Deepayan Sarkar
On 1/25/06, Greg Tarpinian <[EMAIL PROTECTED]> wrote: > R 2.2, WinXP. I am having problems getting the right kind of > xyplot( ) to be generated. The first of these works fine, but > doesn't overlay a reference grid (which I need): > > xyplot(Y ~ X | Factor1, type = 'b', groups = GROUP, > col = c

Re: [R] How to make two side-by side trellis plots same size

2006-01-26 Thread Deepayan Sarkar
On 1/26/06, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear Latticers, > > I want to position two trellis plots of different forms > side-by-side. The plot types are slightly different, > aspect=1 required, but panels should look the same in > both plots. Current workaround uses a guessed factor. >

Re: [R] How to make two side-by side trellis plots same size

2006-01-26 Thread Deepayan Sarkar
On 1/26/06, Dieter Menne <[EMAIL PROTECTED]> wrote: > Thanks, Deepayan > > Deepayan Sarkar gmail.com> writes: > > > > > If that's the only reason, I would suggest rbind-ing them and then use > > > > scales = list(x = "free") > > I

Re: [R] xyplot: making strip function aware of panel.number

2006-01-26 Thread Deepayan Sarkar
On 1/26/06, Benjamin Tyner <[EMAIL PROTECTED]> wrote: > In xyplot(), I'd like to supress the printing of the strip on certain > panels. I thought I'd do this inside the strip function, but it seems > that panel.number doesn't get passed to that. Any ideas? Well, strip has access to much more detai

Re: [R] footnote in postscript lattice

2006-01-26 Thread Deepayan Sarkar
On 1/26/06, Francisco J. Zagmutt <[EMAIL PROTECTED]> wrote: > After you create your xyplot use > library(grid) > panel.text(grid.locator(),label="My label") Also, look up the 'page' argument in ?xyplot. Deepayan > > Cheers > > Francisco > > PS: How is good ol' David these days? > > >From: Dean

Re: [R] about xyplot in lattice

2006-01-27 Thread Deepayan Sarkar
On 1/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all, > > > > I am using xyplot (lattice) to generate a figure like Figure 4.18 in > MASS4, but I have the following two questions (1) how to change the font > of x(y)lab? Something like xyplot(... xlab = list("foo", font = 3),

Re: [R] Multiple xyplots on the same page

2006-02-01 Thread Deepayan Sarkar
On 2/1/06, Ravi Varadhan <[EMAIL PROTECTED]> wrote: > Thank you very much, Andy. It was quite helpful, and I was able to plot 4 > xyplots on one page, but I still couldn't get the legends to fit properly > within each plot, as they were not scaled down automatically. Any hints on > how I can shrin

Re: [R] wireframe zlim option

2006-02-05 Thread Deepayan Sarkar
On 2/5/06, Marius Hofert <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to plot a wireframe of a function which is defined on the > unit square using the lattice library (for trellis-like plots). The plot > contains z-values of about 100 (only in the neighborhood of zero) although > most of t

Re: [R] turn off selected axes in bwplot

2006-02-06 Thread Deepayan Sarkar
On 2/6/06, William Briggs <[EMAIL PROTECTED]> wrote: > > I want to turn off selected axes in bwplot. I would like to only have the > bottom axis drawn, with the others off. Does this do what you want? bwplot(<...>, scales = list(x = list(alternating = 1, tck = c(1, 0 This is describe

Re: [R] turn off selected axes in bwplot

2006-02-06 Thread Deepayan Sarkar
On 2/6/06, William Briggs <[EMAIL PROTECTED]> wrote: > > > Does this do what you want? > > > > bwplot(<...>, > > scales = list(x = list(alternating = 1, tck = c(1, 0 > > > > This is described in detail under 'scales' in ?bwplot. > > Not quite. This controls, if I've understood it correc

Re: [R] panel.levelplot() for 2D histograms

2006-02-06 Thread Deepayan Sarkar
On 2/6/06, Vermeiren, Hans [VRCBE] <[EMAIL PROTECTED]> wrote: > Dear R-wizards, > I'm trying to plot "binned scatterplots", or 2d histograms, if you wish, for > a number of groups by using the lattice functionality > it works fine for one group at a time, and probably I could find a > work-around,

Re: [R] empty wireframe

2006-02-07 Thread Deepayan Sarkar
On 2/7/06, Jeffrey Ross-Ibarra <[EMAIL PROTECTED]> wrote: > Perhaps I am missing something incredibly basic, but I can't get the > wireframe function to plot anything other than an empty graph with > axes (and the correct scale). Cloud() works just fine, as does > scatterplot3d(), and wireframe()

Re: [R] bwplot: how to display response variables separately in same panel?

2006-02-08 Thread Deepayan Sarkar
On 2/8/06, Chris Behr <[EMAIL PROTECTED]> wrote: > Hi - > > I have two response variables 'y1' and 'y2' and a factor 'x'. I would like > to create paired box-whiskers plots for y1~x and y2~x and labeled for the > same x. the b-w plots would be side-by-side in the same panel - almost like > a barcha

Re: [R] contour lines for levelplot

2006-02-13 Thread Deepayan Sarkar
I'm not sure what gave you the idea that there's a limit of 99 contour lines, but no such limit is intended. You need to read the documentation of panel.contourplot and use it in a panel function. Hint: library(lattice) levelplot(volcano, panel = function(..., at, contour = FALSE, label

Re: [R] the proper way to use panel functions in lattice package?

2006-02-13 Thread Deepayan Sarkar
On 2/10/06, simon chou <[EMAIL PROTECTED]> wrote: > Hi, > I was trying to stack a topographic map readed in from esri shapefile with a > contour map and a vector map. However, the plotMap(maptools) and > contourplot(lattice) do not seem to work well on top of each other. Here is > part of my code.

Re: [R] R and Power Point

2006-02-14 Thread Deepayan Sarkar
On 2/14/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 2/14/2006 9:08 AM, Michael Kubovy wrote: > > On Feb 14, 2006, at 1:46 AM, Erin Hodgess wrote: > >> I'm using R in a time series class. ... I have decided to put > >> together Power Point slides for the teaching. ... I am currently > >> savi

Re: [R] Plotting two 3-dimensional time series in a 3 x 2 plot - alternatives to par(mfrow())

2006-02-15 Thread Deepayan Sarkar
On 2/15/06, Søren Højsgaard <[EMAIL PROTECTED]> wrote: > I am trying to plot two 3-dimensional time series in one window (such that > there will be 3 rows and 2 columns). For zoo and ts objects the > par(mfrow...) option does not work. I can get xyplot to make the plots, but > data are on widely di

Re: [R] lattice: calling functions

2006-02-20 Thread Deepayan Sarkar
On 2/14/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 2/14/2006 9:38 AM, Gabor Grothendieck wrote: > > On 2/14/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 2/14/2006 8:56 AM, Wolfram Fischer wrote: > >> > I defined three functions: > >> > > >> >> fun0 <- function( x=1:5, y=1:5, ... )

Re: [R] wireframe, axis label-axis separation, xlab rotation

2006-02-21 Thread Deepayan Sarkar
On 2/21/06, Joaquin Rapela <[EMAIL PROTECTED]> wrote: > Greetings, > > A couple of questions: > > 1. > I am using wireframe. It prints 3d plots nicely on screen, but when I use a > postscript device the z-axis label merges with the z-axis. Is there any > option > to control their separation? > > 2.

Re: [R] indexing within panels in xyplot

2006-02-21 Thread Deepayan Sarkar
On 2/21/06, Sebastian Luque <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > > I need to show a linear fit through a subset of the data within each > combination of levels of two factors. So I prepared an xyplot with > different panels for each level of one of the factors, and different > symbols wi

Re: [R] indexing within panels in xyplot

2006-02-21 Thread Deepayan Sarkar
On 2/21/06, Sebastian Luque <[EMAIL PROTECTED]> wrote: > "Deepayan Sarkar" <[EMAIL PROTECTED]> wrote: > > [...] > > > Well, there are exceptions to this rule, but generally x and y, when > > they are passed on to the panel function, are _already_ subse

Re: [R] How to produce notches in bwplot?

2006-02-26 Thread Deepayan Sarkar
On 2/26/06, Michael Kubovy <[EMAIL PROTECTED]> wrote: > Dear r-helpers, > > tst <- data.frame(as.numeric(x <- 1:20), f <- rep(c('hi','lo'), times > = 10)) > with(tst, bwplot(f ~ x, panel = function(x, y){panel.bwplot(x, y, pch > = '|', stats = boxplot.stats, fill = 8, varwidth = T)})) > > I can't f

Re: [R] lattice-Internal

2006-03-01 Thread Deepayan Sarkar
On 3/1/06, Urs Simmen <[EMAIL PROTECTED]> wrote: > Hi, > > The functions prepanel.default.bwplot() and lpretty() are not running in > Deepayan's > barley example concerning vertical bars with the lattice function > barchart(). What example? Please be more specific. > Why, is there a restricted us

Re: [R] postscript bounding box in trellis/lattice plot is wrong ?

2006-03-01 Thread Deepayan Sarkar
On 3/1/06, context grey <[EMAIL PROTECTED]> wrote: > Hi, a problem involving postscript bounding boxes: > > I'm composing three scatterplots into a single figure, > postsript for publication. > > The individual scatterplots should be square, so > the overall figure should have a roughly 1:3 sort o

Re: [R] Wireframe: Labels parallel to axes?

2006-03-04 Thread Deepayan Sarkar
On 3/4/06, Jan Marius Hofert <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to have the labels parallel to the axes in my wireframe > (lattice) plot. Sure you can use ...xlab=list(label="x-axis",rot=30) > and for the z-axis this is easy (as rot=90), but for the x- and y- > axis the angle is not

Re: [R] Controlling (number of) wires in wireframe

2006-03-04 Thread Deepayan Sarkar
On 3/4/06, Jan Marius Hofert <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to plot a wireframe (library: lattice) of the function f > (x,y)=x*y where x and y are equally evaluated between 0 and 1. > When one uses the option drape=TRUE then each "square" between the > "wires" (lines that build t

Re: [R] Remove "gray grid" from levelplot

2006-03-04 Thread Deepayan Sarkar
On 3/4/06, Jan Marius Hofert <[EMAIL PROTECTED]> wrote: > Hi, > > If I use the levelplot function of the lattice library, I always see > small "squares" in the plot. They indicate the region for which the > same color is used. If you have a levelplot of a function which is > evaluated at 25x25 equa

Re: [R] xyplot/levelplot: thickness of tickmarks

2006-03-04 Thread Deepayan Sarkar
On 3/4/06, Jan Marius Hofert <[EMAIL PROTECTED]> wrote: > Hi, > > if I use the xyplot (or levelplot) function (lattice library) with > the option axs="i", I have the problem that the tickmarks lie a bit > outside the "plot-box". Consider for example: > > library(lattice) > x<-seq(0,1,by=0.01) > y<-

Re: [R] plots - paper vs presentation colors

2006-03-04 Thread Deepayan Sarkar
On 3/4/06, Darren Weber <[EMAIL PROTECTED]> wrote: > Hi, > > I can't find a simple command to switch the plot colors from paper to > presentation formats. Has anyone defined styles that can be easily applied > in one command? > > It would be nice to have a command for papers, using ps or eps outpu

Re: [R] Remove "gray grid" from levelplot

2006-03-06 Thread Deepayan Sarkar
On 3/6/06, Martin Sandiford <[EMAIL PROTECTED]> wrote: > Hi Jan, > > The patch requires a recompile of R. As I understand it, > this is a fairly painful experience. I haven't done it > myself. > > I find that using the pdf() function to open a pdf device > produces better quality output when prin

Re: [R] Trellis stacked bar legend

2006-03-08 Thread Deepayan Sarkar
On 3/8/06, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear R-Listers, > (well... called Depayan) > > The standard example > > barchart(yield ~ variety | site, data = barley, > groups = year, layout = c(1,6), stack = TRUE, > auto.key = list(points = FALSE, rectangles = TRUE, space = "right"),

Re: [R] Accessing plots in Trellis graphics

2007-05-31 Thread Deepayan Sarkar
On 5/31/07, Vladimir Eremeev <[EMAIL PROTECTED]> wrote: > > I used similar empty space to place the legend, by specifying the placement > coordinates to the key argument of xyplot. > This was rather long time ago, and I had to explicitly form the list, used > as the key argument for this function.

Re: [R] handling a cancelled file.choose()

2007-06-06 Thread Deepayan Sarkar
On 6/6/07, Ben Tupper <[EMAIL PROTECTED]> wrote: > Hello, > > > I have a file reading function that prompts the user with a file dialog > if a filename is not provided in the argument list. It is desirable to > return gracefully if the user selects "Cancel", but file.choose() throws > an error ins

Re: [R] Multiple color schemes for barchart (lattice)

2007-06-06 Thread Deepayan Sarkar
On 6/6/07, Sarah Hawley <[EMAIL PROTECTED]> wrote: > Hello R-help. > > I am trying to make a stacked barplot where the color of the sections of > each bar depend on another variable. > > > myData[1:11,] >score percentmarker cellType Malignant > 1 0 100.0 ESR1 (ER) Bladder.M(5

Re: [R] Display Multiple page lattice plots

2007-06-07 Thread Deepayan Sarkar
On 6/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Gudday, > > I am generating a series of lattice contourplots that are conditioned on a > variable (Year) that has 27 different levels. If I try and put them all on > one plot, it ends up pretty messy and you can't really read anything, so

Re: [R] rlm results on trellis plot

2007-06-08 Thread deepayan . sarkar
On 6/7/07, Alan S Barnett <[EMAIL PROTECTED]> wrote: > How do I add to a trellis plot the best fit line from a robust fit? I > can use panel.lm to add a least squares fit, but there is no panel.rlm > function. Well, panel.lmline (not panel.lm, BTW) is defined as: > panel.lmline function (x, y, ..

Re: [R] still trying to wrap xyplot - ignore previous

2007-06-08 Thread Deepayan Sarkar
On 6/8/07, Zack Weinberg <[EMAIL PROTECTED]> wrote: > As you may not be surprised to hear, no sooner did I post the previous > message than I realized I had a really dumb mistake. I've now gotten > a bit farther but am still stuck. New code: > > graph <- function (x, data, groups, xlab) { > pg

Re: [R] Lines in dotchart & dotplot ?

2007-06-09 Thread deepayan . sarkar
On 6/9/07, John Kane <[EMAIL PROTECTED]> wrote: > Is it possible to use dotchart or dotplot and set the > lines in such a way that they only extend from the > left y-axis to the data point? Yes (sort of) in dotplot at least. E.g., dotplot(VADeaths, groups = FALSE, type = c("p", "h")) dotplot(VADe

Re: [R] Lines in dotchart & dotplot ?

2007-06-11 Thread Deepayan Sarkar
On 6/11/07, John Kane <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > > On 6/9/07, John Kane <[EMAIL PROTECTED]> wrote: > > > Is it possible to use dotchart or dotplot and set > > the > > > lines in such a way that they only extend from the > > > left y-axis to the data point? > > >

Re: [R] Overlaying lattice graphs

2007-06-11 Thread Deepayan Sarkar
On 6/11/07, Seb <[EMAIL PROTECTED]> wrote: > Hello > > I apologize in advance if this question has already be posted on the > list, although I could not find a relevant thread in the archives. > > I would like to overlay xyplots using different datasets for each plot. > I typically work on the foll

Re: [R] format.dates, chron and Hmisc

2007-06-12 Thread Deepayan Sarkar
On 6/10/07, R.H. Koning <[EMAIL PROTECTED]> wrote: > Hello, I have some problems in using chron, Hmisc, and lattice. First, > using both chron and Hmisc, I get an error message when describing data: > > df$Date <- chron(df$Date,format=c("d/m/y")) > > ll <- latex(describe(df),file="..//text//df.tex

Re: [R] Stacked barchart color

2007-06-12 Thread Deepayan Sarkar
On 6/12/07, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear Latticer, > > I want to give individual colors to all elements in a simple stacked > barchart. I know why the example below does not work (and it is a excellent > default), but is there any workaround for this? > > Dieter > > > # This only

Re: [R] 2 Trellis graphics question

2007-06-12 Thread Deepayan Sarkar
On 6/12/07, Alan S Barnett <[EMAIL PROTECTED]> wrote: > 1) I have a data that includes some "bad" data. I want to make a > trellis plot where each panel contains > a) A scatter plot of the "good" data > b) A scatter plot of the "bad" data in a different color > c) A best fit line of all the data,

Re: [R] Annotating trellis graphics

2007-06-14 Thread Deepayan Sarkar
On 6/13/07, Alan S Barnett <[EMAIL PROTECTED]> wrote: > I'm using xyplot to generate a trellis plot with each panel containing a > scatterplot and a best fit line. Is it possible to write the slope of > the best fit line in each panel? Sure. The only question is, where (inside the panel) do you w

Re: [R] [OT] 'gv' and fractional points

2007-06-15 Thread Deepayan Sarkar
On 6/15/07, Ted Harding <[EMAIL PROTECTED]> wrote: > Hi Folks, > > This is off-topic R-wise, but it may be close to > the heart of many R-users, so I think it may be > the best place to ask! > > Users of 'gv' (the "front end" to ghostscript) will > be aware of the little window which gives you the

Re: [R] model.frame: how does one use it?

2007-06-15 Thread Deepayan Sarkar
On 6/15/07, Dirk Eddelbuettel <[EMAIL PROTECTED]> wrote: > > Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart. > In short, the issue has to do with how rpart evaluates a formula and > supporting arguments, in particular 'weights'. > > A simple contrived example is > >

Re: [R] model.frame: how does one use it?

2007-06-15 Thread Deepayan Sarkar
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

Re: [R] model.frame: how does one use it?

2007-06-15 Thread Deepayan Sarkar
On 6/15/07, Philipp Benner <[EMAIL PROTECTED]> wrote: > > Thanks for your explanation! > > > 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(myfo

Re: [R] plot via xyplot not being saved

2007-06-15 Thread deepayan . sarkar
On 6/15/07, Benilton Carvalho <[EMAIL PROTECTED]> wrote: > Hi everyone, > > it's been a while I've been trying to save a plot created via > lattice:::xyplot > > if I have a file tst.R with the following code: > > y <- rnorm(100) > x <- rnorm(100) > z <- sample(letters[1:4], 100, rep=T) > library(la

Re: [R] plot via xyplot not being saved

2007-06-15 Thread deepayan . sarkar
On 6/15/07, Benilton Carvalho <[EMAIL PROTECTED]> wrote: > So, if those statements are inside a function, I have to make my > function to have an 'echo' argument/functionality? eg.: > > ## begin test.R > test <- function(n){ >y <- rnorm(n) >x <- rnorm(n) >z <- sample(letters[1:4], n, re

Re: [R] Second y-axis in xyplot (lattice) where y1 and y2 have different ranges

2007-06-18 Thread Deepayan Sarkar
On 6/18/07, Andy Bunn <[EMAIL PROTECTED]> wrote: > Hi all, > > I realize this is asking a lot of lattice, but I want to add a second y > axis inside a xyplot and have y1 and y2 have different ranges. Given dat > below, I can add a second y axis by overlaying a new plot with > par(new=T) and label a

Re: [R] Controlling text and strip arrangement in xyplot

2007-06-19 Thread Deepayan Sarkar
On 6/19/07, Juan Pablo Lewinger <[EMAIL PROTECTED]> wrote: > I've searched the archives and read the xyplot help but can't figure > out the 2 lattice questions below? > > Consider: > > library(lattice) > DF <- data.frame(x=rnorm(20), y=rnorm(20), g1=rep(letters[1:2], 10), > g2=rep

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-19 Thread Deepayan Sarkar
On 6/18/07, Matthew Trunnell <[EMAIL PROTECTED]> wrote: > Aha! So to expand that from the original expression, > > > table(table(d$filename, d$email_addr)) > > 0 1 2 3 > 253 20 8 9 > > I think that is exactly what I'm looking for. I knew it must be > simple!!! What does the 0 column

Re: [R] plotting order of lines in xyplot panels while using conditioning variable and groups

2007-06-19 Thread Deepayan Sarkar
On 6/19/07, RICHARD PITMAN <[EMAIL PROTECTED]> wrote: > I am using the following code: > > library(lattice) > data<-read.csv("data.csv") > attach(data) > > fig<-xyplot(S_t~month|event, >key= list(text=list(lab=c("Time to first CV > event - Data", > "

Re: [R] Retrieve part of (top right corner) of a "plot.data.frame" plot?

2007-06-20 Thread Deepayan Sarkar
On 6/20/07, Dan Bolser <[EMAIL PROTECTED]> wrote: > Hi, > > I believe this question has been asked before, but I cant find and don't > remember the answer. > > The problem is simple, calling 'plot.data.frame(x)' gives a nice 'matrix of > scatterplots' for each pair of columns in x. for example; > >

Re: [R] Overlaying lattice graphs (continued)

2007-06-21 Thread Deepayan Sarkar
On 6/21/07, Sébastien <[EMAIL PROTECTED]> wrote: > Hi Hadley, > > Hopefully, my dataset won't be too hard to changed. Can I modify the > aspect of each group using your code (symbols for observed and lines for > predicted)? > > Sebastien > > hadley wickham a écrit : > > Hi Sebastian, > > > > I thin

Re: [R] barchart in trellis and NA

2007-06-21 Thread Deepayan Sarkar
On 6/21/07, Sigbert Klinke <[EMAIL PROTECTED]> wrote: > Hi, > > I've a dataset with discrete data and several groups and in one group I > have also missing values (NA). When I use table and barchart to > visualize the counts I never get a bar for NA in the barchart although > it appears in the res

Re: [R] Overlaying lattice graphs (continued)

2007-06-22 Thread Deepayan Sarkar
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 the original dataset. > >

Re: [R] Lattice: hiding only some strips

2007-06-22 Thread Deepayan Sarkar
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 merely chops up the data along the > x-axis, so it is easy to identify which part of the shingle a panel is > in by looking at the x-a

Re: [R] Barchart legend position

2007-06-22 Thread Deepayan Sarkar
On 6/22/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote: > I am using barchart to make charts for some data with a lot more > functions and labels and such in the command. > > barchart(Freq ~ factor(HH), data = dataset1, group= year) > > So I have my data grouped by year and I get a legend at

Re: [R] Lattice: hiding only some strips

2007-06-22 Thread deepayan . sarkar
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

Re: [R] xyplot with par

2007-06-27 Thread deepayan . sarkar
On 6/27/07, Afshartous, David <[EMAIL PROTECTED]> wrote: > All, > Is there are a simple way to plot multiple xyplots on the same page > in the code below (it currently overwrites the first plot w/ the > second). > I searched the archives and saw a similar question but the answer didn't > seem to wo

Re: [R] levelplot in lattice

2007-06-27 Thread Deepayan Sarkar
On 6/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new to lattice. So please kindly be patient with me. > I'm trying to arrange groups of levelplots into 3 rows as follows: > > Row1: Probabilities as functions of x and y, and conditioned on an event > factor vector factor("a","

Re: [R] Sweave bug? when writing figures / deleting variable in chunk

2007-06-27 Thread Deepayan Sarkar
On 6/27/07, D G Rossiter <[EMAIL PROTECTED]> wrote: > I have found a quite strange (to me) behaviour in Sweave. It only > occurs in the following situation: > > 1. define a variable in one chunk > 2. use it within a subsequent figure-generating chunk > 3. delete it at the end of that same chunk > T

Re: [R] levelplot in lattice

2007-06-27 Thread deepayan . sarkar
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'm facing. In the following c

Re: [R] Adding different output to different lattice panels

2007-06-28 Thread deepayan . sarkar
On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I would like to add a reference line to lattice graphs, with the reference > line > being different according to the factor level. > > Example : Draw 3 dotplots for "a","b" and "c" factors, and then add an > horizontal line at y=10 for pane

Re: [R] Adding different output to different lattice panels

2007-06-28 Thread Deepayan Sarkar
On 6/28/07, Alexandre Salvador <[EMAIL PROTECTED]> wrote: > Selon [EMAIL PROTECTED]: > > > On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I would like to add a reference line to lattice graphs, with the reference > > > line > > > being different according to the factor level. > > >

Re: [R] Changing graphics height when using grid and lattice

2007-06-28 Thread Deepayan Sarkar
On 6/28/07, Jim Price <[EMAIL PROTECTED]> wrote: > > Hi, > > I have recently been playing with the grid package in an attempt to create > some pages containing multiple lattice plots on the same page. However, when > I specify a grid layout with different widths, such as: > > pushViewport(viewport(

Re: [R] Plots from categorial data

2007-07-01 Thread deepayan . sarkar
On 7/1/07, Jim Lemon <[EMAIL PROTECTED]> wrote: > Christoph Krammer wrote: > > Hello everybody, > > > > Since my first message was caught by the spam filter, I just try to do it > > again: > > > > I want to use R to generate plots from categorial data. The data contains > > results from OCR scans o

Re: [R] Lattice: shifting strips to left of axes

2007-07-02 Thread deepayan . sarkar
On 7/2/07, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Consider this plot: > > xyplot(mpg ~ disp | cyl, mtcars, strip=F, strip.left=T, layout=c(1, 3), > scales=list(relation="free"), > par.settings=list(strip.background=list(col="transparent"))) > > I want to have the "cyl" strip l

Re: [R] Lattice: shifting strips to left of axes

2007-07-03 Thread deepayan . sarkar
On 7/3/07, Michael Hoffman <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On 7/2/07, Michael Hoffman <[EMAIL PROTECTED]> wrote: > >> Consider this plot: > >> > >> xyplot(mpg ~ disp | cyl, mtcars, strip=F, strip.left=T, layout=c(1, 3), > >> scales=list(relation="free"), > >>

Re: [R] retrieving stats from bwplot

2007-07-04 Thread deepayan . sarkar
On 7/3/07, Héctor Villalobos <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to retrieve the stats from a 'bwplot' with one factor. I have read > the help for 'panel' > function and I'm aware of the option 'stats' which defaults to > 'boxplot.stats' but I didn't > understand it well and therefore I

Re: [R] Lookups in R

2007-07-04 Thread deepayan . sarkar
On 7/4/07, Martin Morgan <[EMAIL PROTECTED]> wrote: > Michael, > > A hash provides constant-time access, though the resulting perl-esque > data structures (a hash of lists, e.g.) are not convenient for other > manipulations > > > n_accts <- 10^3 > > n_trans <- 10^4 > > t <- list() > > t$amt <- runi

Re: [R] Lookups in R

2007-07-05 Thread deepayan . sarkar
On 7/5/07, jim holtman <[EMAIL PROTECTED]> wrote: > You are getting two very different results in what you are comparing. > > > system.time(lapply(1:10^4, mean)) > user system elapsed > 1.310.001.31 > is returning a list with 10,000 values in it. It is taking time to allocate > the sp

Re: [R] Adding points to a wireframe with conditioning variable

2007-07-05 Thread Deepayan Sarkar
On 7/5/07, Mark Lyman <[EMAIL PROTECTED]> wrote: > I would like to add points to a wireframe but with a conditioning variable. I > found a solution for this without a conditioning variable here, > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/65321.html. Does anyone know > how to plot a wireframe

Re: [R] pgup/pgdown in R Graphics Window under Linux

2007-07-05 Thread Deepayan Sarkar
On 7/5/07, Paul Matthias Diderichsen <[EMAIL PROTECTED]> wrote: > Dear S-users. > This should be an easy one: How do I change pages on an X11 graphics > device under linux? > > I thought that the page-up/page-down keys were supposed to do the trick, > but the frame (window) seems to be kind of immu

Re: [R] algebra/moving average question - NOTHING TO DO WITH R

2007-07-06 Thread Deepayan Sarkar
On 7/6/07, Leeds, Mark (IED) <[EMAIL PROTECTED]> wrote: > This has ABSOLUTELY nothing to do with R but I was hoping that someone > might know because there are obviously a lot of very bright people on > this list. > > Suppose I had a time series of data and at each point in time t, I was > calculat

Re: [R] Changing Tick Mark Values for lattice / wireframe

2007-07-06 Thread Deepayan Sarkar
On 7/6/07, Anthony Pezzola <[EMAIL PROTECTED]> wrote: > How can I change the tick mark values in lattice, specifically wireframe? > > I have a 11*46 matrix of values that I am plotting using wireframe. > Unfortunely, the values range from 0.1-1.1 and 0.5-5. Using the code > below the tick marks ha

Re: [R] Several quick questions

2007-07-08 Thread deepayan . sarkar
On 7/7/07, Sébastien <[EMAIL PROTECTED]> wrote: > Dear R users, > > Here is a couple a quick questions, for which I was unable to not find > any answer in the list archives and in the help: [...] > 2- When a log scale is called in a graph, the label takes a format like > 10^n. That's true for la

Re: [R] Antwort: Re: pgup/pgdown in R Graphics Window under Linux ['Watchdog': checked]

2007-07-09 Thread Deepayan Sarkar
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

Re: [R] Lattice: vertical barchart

2007-07-10 Thread Deepayan Sarkar
On 7/10/07, Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote: > > > Michael Hoffman said the following on 7/10/2007 7:06 AM: > > barchart(Titanic, stack=F) produces a very nice horizontal barchart. > > Each panel has four groups of two bars. > > > > barchart(Titanic, stack=F, horizontal=F) doesn't produc

Re: [R] Formatting panel borders in lattice package

2007-07-10 Thread Deepayan Sarkar
On 7/10/07, Hil Lyons <[EMAIL PROTECTED]> wrote: > Hello all -- > > I would like to thicken the borders between panels -- or more generally, > all borders -- in a plot generated using lattice (specifically, > levelplot). Something similar perhaps to box() function in graphics. > I haven't been suc

Re: [R] Drawing rectangles in multiple panels

2007-07-11 Thread deepayan . sarkar
On 7/11/07, Jonathan Williams <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm having some trouble understanding the intricacies of panel > functions. I wish to create three side-by-side graphs, each with > different data-- so far, so good: I rbind() the data, add a column of > subscripts as a condi

Re: [R] Drawing rectangles in multiple panels

2007-07-11 Thread deepayan . sarkar
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 done external to the tr

Re: [R] Drawing rectangles in multiple panels

2007-07-11 Thread deepayan . sarkar
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 test data. Right. So if y

Re: [R] Drawing rectangles in multiple panels

2007-07-11 Thread Deepayan Sarkar
On 7/11/07, hadley wickham <[EMAIL PROTECTED]> wrote: > > 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 done external to the trellis > > cal

Re: [R] Drawing rectangles in multiple panels

2007-07-11 Thread Deepayan Sarkar
On 7/11/07, Stephen Tucker <[EMAIL PROTECTED]> wrote: > In the Trellis approach, another way (I like) to deal with multiple pieces of > external data sources is to 'attach' them to panel functions through lexical > closures. For instance... > > rectInfo <- > list(matrix(runif(4), 2, 2), >

Re: [R] Direction of panel plots in trellis graphics

2007-07-13 Thread deepayan . sarkar
On 7/13/07, Richard M. Heiberger <[EMAIL PROTECTED]> wrote: > You can control the panel sequence with subscripting and transpose. > Here are several examples. I think tmp.tr3 is the one you asked for. > > library(lattice) > > tmp <- data.frame(x=rnorm(24), y=rnorm(24), a=rep(letters[1:6],4), > b=r

Re: [R] Subplot.

2007-07-13 Thread Deepayan Sarkar
On 7/13/07, suman Duvvuru <[EMAIL PROTECTED]> wrote: > Hello All, > > I wanted to do many plots (in my case, wanted to get 6 histograms) on the > same figure. Is there a method in R that analogous to 'subplot' in MATLAB? Here are a few possibilities: data(singer, package = "lattice") ## using

Re: [R] change default alphabetic order for bwplot

2007-07-13 Thread deepayan . sarkar
On 7/13/07, gallon li <[EMAIL PROTECTED]> wrote: > when producing boxplot from bwplot, I have five groups: Nitrogen, Duration, > Pressure, A, Z. I wish the graphical display is according to the original > order. But the R-function bwplot seems to automatically adjust the groups > according to the a

Re: [R] Drawing rectangles in multiple panels

2007-07-14 Thread Deepayan Sarkar
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

Re: [R] Restructuring data

2007-07-15 Thread deepayan . sarkar
On 7/15/07, Daniel Malter <[EMAIL PROTECTED]> wrote: > Hi folks, > > I am new to the list and relatively new to R. I am trying to unstack data > "arraywise" and could not find a convenient solution yet. I tried to find a > solution for the problem on help archives. I also tried to use the reshape >

Re: [R] xyplot for longitudinal data

2007-07-17 Thread Deepayan Sarkar
On 7/17/07, Osman Al-Radi <[EMAIL PROTECTED]> wrote: > Dear R-help subscribers, > > I use xyplot to plot longitudinal data as follows: > > score<-runif(100,-4,5) > group<-sample(1:4,100,rep=T) > subject<-rep(1:25,4) > age<-rep(runif(4,1,40),25) > df<-data.frame(score,group,age,subject) > > xyplot(s

Re: [R] lattice plot axis scaling

2007-07-18 Thread Deepayan Sarkar
On 7/18/07, Alan S Barnett <[EMAIL PROTECTED]> wrote: > I want to generate a lattice plot of a multiple linear regression. I'm > using the code: > > xyplot(y ~ x1 + x2 | status, data=datam, > xlab="Peak separation",ylab="G/W",main="G/W vs Fuzzy peak > separation: Threshold=1.8", >

Re: [R] creating a world map of eco-climatic zones

2007-07-18 Thread Deepayan Sarkar
On 7/18/07, Tanja Srebotnjak <[EMAIL PROTECTED]> wrote: > Hello R users: > > I would like to produce a world map with countries colored according to > whether > they fall into one of 7 eco-climatic zones. For simplicity, each country is > allocated to exactly 1 eco-climatic zone. For this purpose

Re: [R] Overlaying a single contour from a new data array in levelplot

2007-07-24 Thread Deepayan Sarkar
On 7/24/07, Jenny Barnes <[EMAIL PROTECTED]> wrote: > Dear R-Help community, > > I am trying to overlay a single contour line over a correlation plot using > levelplot in the lattice package. These are the two arrays: > > 1) a correlation plot over Africa - so each grid square is a different colour

Re: [R] How to auto-scale cex of y-axis labels in lattice dotplot?

2007-07-26 Thread Deepayan Sarkar
On 7/25/07, Kevin Wright <[EMAIL PROTECTED]> wrote: > When I create a dotplot in lattice, I frequently observe overplotting > of the labels along the vertical axis. On my screen, this illustrates > overplotting of the letters: > > windows() > reps=6 > dat=data.frame(let=rep(letters,each=reps), grp

Re: [R] Overlaying a single contour from a new data array in levelplot

2007-07-30 Thread Deepayan Sarkar
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 > asked about the colour of the polygon outlin

Re: [R] lattice grayscale "theme"

2007-07-30 Thread Deepayan Sarkar
On 7/28/07, Patrick Drechsler <[EMAIL PROTECTED]> wrote: > Hi, > > is there a grayscale setting for lattice plots? > > I like the default color settings. I also like the settings that are > available for setting black and white with something like this: > > --8<---cut here--

Re: [R] lattice grayscale "theme"

2007-07-30 Thread Deepayan Sarkar
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: > >&

<    1   2   3   4   5   6   7   8   9   10   >