Re: [R] R_WinEdt question

2006-11-30 Thread Uwe Ligges
This is a LaTeX questions and has nothing to do neither RWinEdt nor WinEdt nor R. Hence chosen mailing list and chosen subject line are both inappropriate. Uwe Ligges Aimin Yan wrote: > if I want to put fig1plot to the left, figYPplot to the right > figYAaplot on the bottom. > How to modify t

[R] margins within plotting region

2006-11-30 Thread wouter . buytaert
Hi list, there always seem to be a small margin between the actual plot and the axes/box around the plot. For instance, in plot(c(0,1),c(0,1)) the 2 points do not lay on the box around the plot but slightly more to the center. Which parameter controls this margin and is it possible to elimin

[R] problem with chiMerge

2006-11-30 Thread A.R. Ebrahimi
Hi, I am trying to discretize a numeric attribute of a data.frame using chiMerge mydata2<-chiMerge(mydata1, c(7), alpha = 0.05) but this command never returns, and I have to forcefully STOP the operation. Is this a bug or am I missing somthing? Can anybody help me. please? Thanks in advance.

[R] from data.frame to transactions

2006-11-30 Thread A.R. Ebrahimi
Hi, I am trying to perform associan rule mining on a dataset I have loaded form a CSV file, but the [apriori] function of [arules] package accepts binaryMatrices or transactions only. Is there any straightforward way through this conversion? Thanks in advance. _

Re: [R] margins within plotting region

2006-11-30 Thread Uwe Ligges
See ?par: par(xaxs = "i", yaxs = "i") plot(0:1, 0:1) Uwe Ligges [EMAIL PROTECTED] wrote: > Hi list, > > there always seem to be a small margin between the actual plot and the > axes/box around the plot. For instance, in > > plot(c(0,1),c(0,1)) > > the 2 points do not lay on the box around

[R] *** caught segfault *** error

2006-11-30 Thread Juanjo Abellan
Dear R users, I use R 2.4.0 on an iMac running Mac OS X 10.4.8, with a 2.16GHz Intel Core 2 Duo and 2GB 667 MHz DDR2 SDRAM. > sessionInfo() R version 2.4.0 (2006-10-03) i386-apple-darwin8.8.1 locale: es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8 attached base packages: [1] "m

Re: [R] margins within plotting region

2006-11-30 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > Hi list, > > there always seem to be a small margin between the actual plot and the > axes/box around the plot. For instance, in > > plot(c(0,1),c(0,1)) > > the 2 points do not lay on the box around the plot but slightly more to > the center. Which parameter controls th

Re: [R] *** caught segfault *** error

2006-11-30 Thread Roger Bivand
On Thu, 30 Nov 2006, Juanjo Abellan wrote: > Dear R users, > > I use R 2.4.0 on an iMac running Mac OS X 10.4.8, with a 2.16GHz > Intel Core 2 Duo and 2GB 667 MHz DDR2 SDRAM. > Please make a copy of the offending shapefile available either on a website or attach it to me off-list. It would b

Re: [R] R_WinEdt question

2006-11-30 Thread Mark Wardle
Aimin Yan wrote: > if I want to put fig1plot to the left, figYPplot to the right > figYAaplot on the bottom. > How to modify the following cod to do these? An example is below. I obviously won't include examples of how to use par() as these have been documented in detail almost everywhere, and if

Re: [R] R_WinEdt question

2006-11-30 Thread Mark Wardle
Aimin Yan wrote: > if I want to put fig1plot to the left, figYPplot to the right > figYAaplot on the bottom. > How to modify the following cod to do these? > There are several ways to arrange multiple figures. 1. Use LaTeX to organise separate figures Please read the documentation about package

[R] scaling y-axis to relative frequency in multiple histogram (multhist)

2006-11-30 Thread ahimsa campos-arceiz
Hi, I'm plotting a multiple histogram using the function multhist {package plotrix}, something like: library(plotrix) mh <- list(rnorm(200, mean=200, sd=50), rnorm(200, mean=250, sd=50)) multhist(mh) In this graph y-axis represents the frequency of observations but I would like it to be scal

[R] writing lists fastly on file

2006-11-30 Thread Milton Cezar Ribeiro
Hi there, I have a big amount of "lists" of data, each one with dimension 1024x1024. When I save it in an ASCII file (using "write" function) it take about 15 minutes. As I need run about 500,000 times this same routine, and I would like to do this save task in a fast way. In fact I

Re: [R] writing lists fastly on file

2006-11-30 Thread Duncan Murdoch
On 11/30/2006 6:55 AM, Milton Cezar Ribeiro wrote: > Hi there, > > I have a big amount of "lists" of data, each one with dimension 1024x1024. > When I save it in an ASCII file (using "write" function) it take about 15 > minutes. As I need run about 500,000 times this same routine, and I wou

[R] update.packages

2006-11-30 Thread Giovanni Parrinello
Dear All, from some days when I try to update the installed packages I receive this answer: update.packages(ask='graphics') --- Please select a CRAN mirror for use in this session --- Error in as.list(read.dcf(file = file)[1, ]) : indice fuori limite # index out of bound TIA Giovanni PS: I

Re: [R] error in latex() : n.group : RESOLVED

2006-11-30 Thread Frank E Harrell Jr
Ben wrote: > that was trivial and logical ... > You just have to download the source from the repository and then use the > function source() with it in your script ... Please look at our web site's directions. getLatestSource( ) does source( ) for you. Frank > > 2006/11/24, Ben <[EMAIL PRO

[R] AIC for heckit

2006-11-30 Thread Werner Wernersen
Hi, I have used the heckit function in micEcon. Now I would like to evaluate the fit of the probit part of the model but when I enter AIC(sk$probit) I get this error Error in logLik(object) : no applicable method for "logLik" How can I then get the AIC for this model? Side question: If you kno

Re: [R] scaling y-axis to relative frequency in multiple hi stogram (multhist)

2006-11-30 Thread Ben Bolker
ahimsa campos-arceiz camposarceiz.com> writes: > > Hi, > > I'm plotting a multiple histogram using the function multhist {package > plotrix}, something like: > > library(plotrix) > mh <- list(rnorm(200, mean=200, sd=50), rnorm(200, mean=250, sd=50)) > multhist(mh) > > In this graph y-axis rep

[R] tick label rotation in xyplot (lattice)

2006-11-30 Thread Dan Bebber
Is there any way of rotating tick labels in xyplot? Perhaps some command in scales? My y-values are high (1000s) leading to a lot of white space in the plots. Thanks, Dan Bebber Department of Plant Sciences University of Oxford __ R-help@stat.math.eth

Re: [R] writing lists fastly on file

2006-11-30 Thread Milton Cezar Ribeiro
In fact I have somethig like mat.dat<-matrix(rep(c(1,2,4,2,1,0,1,2),128*1024)) write (mat.dat,"c:\\tmp\\mydat.txt") * remembering that I will run it about 500,000 times. The program that I will use to analyze (landscape metrics) my output files read text files ou

Re: [R] tick label rotation in xyplot (lattice)

2006-11-30 Thread Chuck Cleland
Dan Bebber wrote: > Is there any way of rotating tick labels in xyplot? Perhaps some command in > scales? > My y-values are high (1000s) leading to a lot of white space in the plots. Yes, the scales section of ?xyplot mentions a rot argument. Here is an example: df <- expand.grid(1:2, 1992:20

[R] extending data.frame with S4 class

2006-11-30 Thread Tim Bergsma
Hi. When I extend "numeric" with S4 and create an instance, I get something that looks and acts like a numeric. When I extend "data.frame" and create an instance, I get a NULL 'core'. Why is this, and can it be fixed? setOldClass(), prototype=, and initialize() don't seem to help. Thanks,

Re: [R] writing lists fastly on file

2006-11-30 Thread Duncan Murdoch
On 11/30/2006 8:19 AM, Milton Cezar Ribeiro wrote: > In fact I have somethig like > > mat.dat<-matrix(rep(c(1,2,4,2,1,0,1,2),128*1024)) > write (mat.dat,"c:\\tmp\\mydat.txt") > > * remembering that I will run it about 500,000 times. > > The program that I will use

Re: [R] scaling y-axis to relative frequency in multiple histogram (multhist)

2006-11-30 Thread ahimsa campos-arceiz
Dear Ben, thank you very much for your prompt reply. but I'm afraid I'm missing something: when I apply your function pmulthist I obtain exactly the same results as with multhist (with the y axis representing frequencies rather than a probability). I was checking but couldn't find the problem (*

Re: [R] writing lists fastly on file

2006-11-30 Thread Prof Brian Ripley
On Thu, 30 Nov 2006, Duncan Murdoch wrote: > On 11/30/2006 6:55 AM, Milton Cezar Ribeiro wrote: >> Hi there, >> >> I have a big amount of "lists" of data, each one with dimension >> 1024x1024. When I save it in an ASCII file (using "write" function) it >> take about 15 minutes. As I need run a

[R] Looking for nice implementations of rectangular scatterplot matrices

2006-11-30 Thread christian.ritter
... finding myself doing this by hand one too many times ... maybe someone else has found a nice general solution ... I have a data frame containing n rows on p+q variables which I will call p.1, p2, ..., pp and q1, q2, ... qq. For simplicity all of these variables are continuous numeric. I wan

[R] Standardized deviance residuals in plot.lm

2006-11-30 Thread Tatyana Krivobokova
It seems that the standardized deviance residulas, that one gets on plots of a glm.object x with plot(x) are calculated as r <- residuals(x) s <- sqrt(deviance(x)/df.residual(x)) w <- weights(x) hii <- lm.influence(x)$hat r.w <- if (is.null(w)) r else (sqrt(w) * r) rs <- r.w/(s * sqrt(1 - hii))

Re: [R] tick label rotation in xyplot (lattice)

2006-11-30 Thread Dan Bebber
Thanks - I'm guilty of not checking the help files thoroughly enough. My apologies. Dan - Original Message - From: "Chuck Cleland" <[EMAIL PROTECTED]> To: "Dan Bebber" <[EMAIL PROTECTED]> Cc: Sent: Thursday, November 30, 2006 1:22 PM Subject: Re: [R] tick label rotation in xyplot (latt

[R] 3D histogramm

2006-11-30 Thread Céline Henzelin
thank you for your answer i checked my code and it now works One more question... do you know how to have an 3D histogramm from a known matrix of probabilities Cline >From: "David Barron" <[EMAIL PROTECTED]> >To: "Céline Henzelin" <[EMAIL PROTECTED]>, r-help > >Subject: Re: [R] (no subject)

Re: [R] Looking for nice implementations of rectangular scatterplot matrices

2006-11-30 Thread Richard M. Heiberger
library(lattice) tmp <- data.frame(y1=rnorm(3), y2=rnorm(3), x1=rnorm(3), x2=rnorm(3), x3=rnorm(3)) xyplot(y1+y2 ~ x1+x2+x3, data=tmp, outer=TRUE) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] legend in lattice densityplot

2006-11-30 Thread Albert Vilella
Can I combine colors and line types? For example, would it be possible to have 5 colors per 2 types of lines (continuous and dashed)? On 11/29/06, Chuck Cleland <[EMAIL PROTECTED]> wrote: > Albert Vilella wrote: > > Are this legend colors correlated to the plot? > > They are if you rely on the c

Re: [R] legend in lattice densityplot

2006-11-30 Thread Chuck Cleland
Albert Vilella wrote: > Can I combine colors and line types? For example, would it be possible > to have 5 colors per 2 types of lines (continuous and dashed)? Yes. Using Gabor's suggestion of changing the trellis settings within the call to densityplot(), try something like this: x <- c(rnorm

Re: [R] legend in lattice densityplot

2006-11-30 Thread Gabor Grothendieck
Yes by using the lty suboption of superpose.line. Here is a modification of the prior example to illustrate: We also use lwd as well in this example. set.seed(1) DF <- data.frame(x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)), f = sample(c("A","B","C","D","E"),300,replace=TRUE)) libra

Re: [R] scaling y-axis to relative frequency in multiple histogram (multhist)

2006-11-30 Thread Ben Bolker
ahimsa campos-arceiz wrote: > Dear Ben, > > thank you very much for your prompt reply. > > but I'm afraid I'm missing something: when I apply your function > pmulthist I > obtain exactly the same results as with multhist (with the y axis > representing frequencies rather than a probability). > >

Re: [R] legend in lattice densityplot

2006-11-30 Thread Albert Vilella
Should it be a problem to print this dashed line plots as svgs? library(RSvgDevice) devSVG(file = "/home/avilella/file01.svg", width = 20, height = 16, bg = "white", fg = "black", onefile=TRUE, xmlHeader=TRUE) densityplot(...) dev.off() I am getting all the lines as continuous, not

[R] Preventing early stopping in neural network (nnet package)

2006-11-30 Thread Wee-Jin Goh
Hello there, I'm back again with another question about the neural network package. I'm having trouble getting the network to run for the maximum number of iterations. It always stops early, usually after 100 iterations claiming to have converged at an answer. Now, for my purposes I want it

Re: [R] update.packages

2006-11-30 Thread Prof Brian Ripley
On Thu, 30 Nov 2006, Giovanni Parrinello wrote: > Dear All, > from some days when I try to update the installed packages I receive > this answer: > update.packages(ask='graphics') > --- Please select a CRAN mirror for use in this session --- > Error in as.list(read.dcf(file = file)[1, ]) : >

[R] Quicker way of combining vectors into a data.frame

2006-11-30 Thread Gavin Simpson
Hi, In a function, I compute 10 (un-named) vectors of reasonable length (4471 in the particular example I have to hand) that I want to combine into a data frame object, that the function will return. This is very slow, so *I'm* doing something wrong if I want it to be quick and efficient, though

Re: [R] legend in lattice densityplot

2006-11-30 Thread Gabor Grothendieck
Me too on Windows XP. Its probably just a bug or unimplemented feature in the SVG driver. Write to the maintainer of that package For a workaround generate fig output and then convert it to svg using whatever fig editor or converter you have. (On my windows system I use the free fig2dev converte

Re: [R] Quicker way of combining vectors into a data.frame

2006-11-30 Thread Marc Schwartz
On Thu, 2006-11-30 at 17:00 +, Gavin Simpson wrote: > Hi, > > In a function, I compute 10 (un-named) vectors of reasonable length > (4471 in the particular example I have to hand) that I want to combine > into a data frame object, that the function will return. > > This is very slow, so *I'm*

[R] Expression

2006-11-30 Thread Guenther, Cameron
Hi all, I have a question about expression. In a figure I want to include the term D*obs with the star as as superscript and obs as subscript. I have even just tried to get the star to be superscript. The code I tried was text(Dstar+7,120,expression(paste({}D,^*))), but that doesn't work and

Re: [R] Why the factor levels returned by cut() are not ordered?

2006-11-30 Thread Prof Brian Ripley
On Wed, 29 Nov 2006, Petr Pikal wrote: > > > On 29 Nov 2006 at 12:08, Peter Dalgaard wrote: > > Date sent:Wed, 29 Nov 2006 12:08:21 +0100 > From: Peter Dalgaard <[EMAIL PROTECTED]> > To: Wolfram Fischer <[EMAIL PROTECTED]> > Copies to:r-hel

[R] new_data_frame <- selected set of rows

2006-11-30 Thread Darek Kedra
Hello, this is probably trivial but I failed to find this particular snippet of code. What I got: my_dataframe (contains say a 40k rows and 4 columns) distances (vector with euclidean distances between a query vector and each of the rows of my_dataframe) What I do: after scaling data my_datafra

Re: [R] Quicker way of combining vectors into a data.frame

2006-11-30 Thread Prof Brian Ripley
If you are prepared to give up most of the sanity checks, see this at the bottom of read.table: ## this is extremely underhanded ## we should use the constructor function ... ## don't try this at home kids class(data) <- "data.frame" row.names(data) <- row.names dat

Re: [R] Quicker way of combining vectors into a data.frame

2006-11-30 Thread Sebastian Weber
Hi! I don't know for sure - and I have not tried it yet, but how about allocating a matrix which will hold all stuff, then put all vectors in it and at last assign some dimnames to it: data <- matrix(0, ncol=5, nrow=length(vec1)) data[1,] <- vec1 ... dimnames(data) <- list(c(1,2,3,4,5), ) as.dat

Re: [R] Quicker way of combining vectors into a data.frame

2006-11-30 Thread Marc Schwartz
Gavin, One more note, which is that even timing the direct data frame creation on my system with colnames, again using the same 10 numeric columns, I get: > system.time(DF1 <- data.frame(lc.ratio = Col1, Q = Col2, fNupt = Col3, rho.n = Col4, rho.s = Col5,

Re: [R] Expression

2006-11-30 Thread Gabor Grothendieck
Try: plot(1, main = ~ D[obs]^"*") On 11/30/06, Guenther, Cameron <[EMAIL PROTECTED]> wrote: > Hi all, > I have a question about expression. > > In a figure I want to include the term D*obs with the star as as > superscript and obs as subscript. I have even just tried to get the > star to be supe

Re: [R] ML fit of gamma distribution to grouped data

2006-11-30 Thread Thomas Petzoldt
Dear Augusto, thank you for your example. Your solutions are the in fact the usual methods, but these do not apply to my case because I have grouped data. The good news is, that the solution of Prof. Brian Ripley works perfectly -- of course :-) Thank you both for your help. Thomas P. [EMAI

Re: [R] Expression

2006-11-30 Thread Barry Rowlingson
Guenther, Cameron wrote: > The code I tried was > text(Dstar+7,120,expression(paste({}D,^*))), but that doesn't work and I > get a syntax error. > > I can't seem to find anything in the help files that explains it. > plot(1:10) > text(8,5,expression(D[obs]^"*")) works for me... Barry __

Re: [R] Expression

2006-11-30 Thread Peter Dalgaard
Guenther, Cameron wrote: > Hi all, > I have a question about expression. > > In a figure I want to include the term D*obs with the star as as > superscript and obs as subscript. I have even just tried to get the > star to be superscript. > > > The code I tried was > text(Dstar+7,120,expression(

Re: [R] Dummies multiplied with other variable

2006-11-30 Thread David Barron
I'm not sure if this will help, but it's worth a try. Do the regression as I suggested before, extract the model matrix and remove the "offending" column. I'm assuming you don't know in advance how many levels there are in the factor. Then use this to perform the regression. Something like this

[R] escape character to get " printed in output

2006-11-30 Thread roger bos
I want to use R to run dos commands (either by create batch files or using shell())and I need to write double quotes on the file (or shell command). As an easier example, lets take: > print("hello 'hello' hello") [1] "hello 'hello' hello" Lets say instead of the above, I wanted: "hello "hello" h

[R] writing function with ,... )

2006-11-30 Thread Carmen Meier
Hi to all I did not found the right hints for functions with the dot-dot-dot argument. Is it possible to write own functions with the tree dots and if yes what's wrong with the following example? test <- function(x, ...) { print (x) if (exists("y"))print(y) if (exists("z"))print(z) } test(4,y=2

Re: [R] escape character to get " printed in output

2006-11-30 Thread Marc Schwartz
On Thu, 2006-11-30 at 15:05 -0500, roger bos wrote: > I want to use R to run dos commands (either by create batch files or > using shell())and I need to write double quotes on the file (or shell > command). As an easier example, lets take: > > > print("hello 'hello' hello") > [1] "hello 'hello' h

Re: [R] escape character to get " printed in output

2006-11-30 Thread Gabor Grothendieck
It did work. That's how print represents strings. Try: > cat("hello \"hello\" hello") hello "hello" hello> > strsplit("hello \"hello\" hello", "")[[1]] [1] "h" "e" "l" "l" "o" " " "\"" "h" "e" "l" "l" "o" "\"" " " "h" [16] "e" "l" "l" "o" On 11/30/06, roger bos <[EMAIL PROTECTED

Re: [R] escape character to get " printed in output

2006-11-30 Thread Bos, Roger
Gabor & Marc, Yes, you are right. Thanks for clarifying that for me. I should have tested it fully before hand. Thanks, Roger -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Thursday, November 30, 2006 3:12 PM To: roger bos Cc: RHelp Subject: Re: [R] esca

Re: [R] writing function with ,... )

2006-11-30 Thread Gabor Grothendieck
Try this: > test <- function(x, ...) { + print(x) + dots <- list(...) + if ("y" %in% names(dots)) print(dots$y) + } > test(3, y = 43) [1] 3 [1] 43 > test(4, z = 44) [1] 4 > On 11/30/06, Carmen Meier <[EMAIL PROTECTED]> wrote: > Hi to all > I did not found the right hints for functions with the do

Re: [R] writing function with ,... )

2006-11-30 Thread Marc Schwartz
On Thu, 2006-11-30 at 21:10 +0100, Carmen Meier wrote: > Hi to all > I did not found the right hints for functions with the dot-dot-dot argument. > Is it possible to write own functions with the tree dots and if yes > what's wrong with the following example? > > > test <- function(x, ...) > { >

Re: [R] random binary trees in R

2006-11-30 Thread Steven Finch
Hello again! Uwe Ligges' adjustment to my random binary tree recursion works beautifully. Now I wish to plot the trees. Despite a careful search, I can't find any plotting routine that will work with my lists. I've read about "hierarchical clustering" and "binary dendrograms" in various R pack

[R] newbie: new_data_frame <- selected set of rows

2006-11-30 Thread Darek Kedra
Hello, this is probably trivial but I failed to find this particular snippet of code. What I got: my_dataframe (contains say a 40k rows and 4 columns) distances (vector with euclidean distances between a query vector and each of the rows of my_dataframe) What I do: after scaling data my_datafram

[R] analog to the matlab buffer function?

2006-11-30 Thread Martin Ivanov
Hello! I am new to R. I could not find a function analogous to matlab's function buffer, which is used in signal processing. Is there such a function in R? What I need to do is as follows. If I apply the function to the vector c(1:5) for example with a window length 3 and overlapping 2, I need to

[R] R2WinBUGS - parameter monitor seting

2006-11-30 Thread Doug Lincoln
R2WinBUGS users, I'm getting the error message "monitor could not be set" when I try to monitor (and output to R) a response variable that includes missing data (NAs)...ie.e imputing for y. Setting monitors for other parameters works OK and running the R-generated WinBUGS script file in WinBUGS, a

Re: [R] reshape command is (stats) dropping instances

2006-11-30 Thread Farrel Buchinsky
Thank you very much Hadley. I still do not know why my original reshape command did not work but for the "price" of a library download I was able to solve my problem wonderfully. Thank you for salvaging many hours of work. The melt and cast concept is wonderful and simple Farrel On 11/29/06, ha

Re: [R] analog to the matlab buffer function?

2006-11-30 Thread Charles C. Berry
See ?embed It is not quite the same, but this seems to be what you want - at least for the example you give: > t( embed(1:5,3) )[3:1,] [,1] [,2] [,3] [1,]123 [2,]234 [3,]345 > On Fri, 1 Dec 2006, Martin Ivanov wrote: > Hello! I am new to R. I

[R] query on nlm() function

2006-11-30 Thread amit soni
Does nlm() function(non linear optimization function) supports quadratic constraints? Thanks Amit [[alternative HTML version deleted]] __ R-help@stat.

Re: [R] analog to the matlab buffer function?

2006-11-30 Thread Marc Schwartz
Here is another possibility, though I may be missing how the Matlab function handles incomplete rows generated at the end of the source vector. I have not fully tested this, so it may yet require some tweaking and certainly appropriate error checking. I am presuming that the basic premise is that

Re: [R] help

2006-11-30 Thread Spencer Graves
In case you haven't already received an adequate reply (which I haven't seen) or figured this out on your own, I will comment. Consider the following modifications of an example in the 'lmer' documentation: (fm0.0 <- lmer(Reaction~(1|Subject), sleepstudy)) (fm0.1 <- lmer(Reaction~1+(1|Su

[R] Vertical line in densityplot?

2006-11-30 Thread Gustaf Rydevik
Hi all, I'm trying to get a vertical line at a specific point in a densityplot. abline seems to be what's required, but it doesn't align itself to the scale used in the plot. example: library(lattice) x<-rnorm(100) plot.new() densityplot(x) abline(v=0) - The line seems to use some other coor

[R] Vertical line in densityplot?

2006-11-30 Thread Ken Knoblauch
I think that you are mixing lattice and base graphics. This works for me: library(lattice) x<-rnorm(100) densityplot(x, panel = function(x, ...) { panel.densityplot(x, ...) panel.abli

Re: [R] Vertical line in densityplot?

2006-11-30 Thread Thomas Petzoldt
Hi, lattice graphics work by utilizing so called panel functions. Here is a working version of your example: library(lattice) x<-rnorm(100) plot.new() densityplot(x, panel=function(x, ...){ panel.densityplot(x, ...) panel.abline(v=0) } ) For mor information, please look into th