[R] adding graphics after dev.copy

2007-02-28 Thread Giampiero Salvi
Hi, I am trying to create a plot and save it as pdf to the file file1.pdf, then add some details and save the new plot as file2.pdf. I would like to avoid repeating all the instructions needed to create file1.pdf when I create file2.pdf. This is what I have tried: pdf(file=file1.pdf) plot(1:10)

Re: [R] adding graphics after dev.copy

2007-02-28 Thread Giampiero Salvi
On Wed, 28 Feb 2007, Giampiero Salvi wrote: Hi, I am trying to create a plot and save it as pdf to the file file1.pdf, then add some details and save the new plot as file2.pdf. I would like to avoid repeating all the instructions needed to create file1.pdf when I create file2.pdf. This is what

Re: [R] adding graphics after dev.copy

2007-02-28 Thread Giampiero Salvi
Hi, sorry for the multiple posting ;) Here is the way to do it: pdf(file=file1.pdf) dev.control(displaylist='enable') plot(1:10) dev.copy(pdf,file=file2.pdf) points(2,3) dev.off() dev.off() Giampiero __ R-help@stat.math.ethz.ch mailing list

[R] adding a method to the dist function

2004-05-03 Thread Giampiero Salvi
Hi all, I'd like to add the Bhattacharyya method to the dist function. What is the best way to do this? I'm using R 1.9.0 and I was looking for the code that defines the already existing distances, but I didn't manage. As far as I understand, dist is defined in mva that is part of the stats

Re: [R] adding a method to the dist function

2004-05-03 Thread Giampiero Salvi
On Mon, 3 May 2004, Prof Brian Ripley wrote: On Mon, 3 May 2004, Giampiero Salvi wrote: Hi all, I'd like to add the Bhattacharyya method to the dist function. What is the best way to do this? I'm using R 1.9.0 and I was looking for the code that defines the already existing distances

Re: [R] adding a method to the dist function

2004-05-03 Thread Giampiero Salvi
On Mon, 3 May 2004, Prof Brian Ripley wrote: dist() compares pairs of rows in the x matrix. How can they have `means and covariances'? -- you have a sample of size one from each of two populations. It seems that (Gaussian) Bhattacharyya is more like mahalanobis(). I had planned to use mean

Re: [R] adding a method to the dist function

2004-05-03 Thread Giampiero Salvi
On Mon, 3 May 2004, Prof Brian Ripley wrote: On Mon, 3 May 2004, Giampiero Salvi wrote: On Mon, 3 May 2004, Prof Brian Ripley wrote: dist() compares pairs of rows in the x matrix. How can they have `means and covariances'? -- you have a sample of size one from each of two

[R] how to fix a factor

2004-03-19 Thread Giampiero Salvi
Hi all, I created a data frame with three factors, plus the response that looks like this: x1 x2 x3 y a 1 1 0.3 a 2 1 0.1 b 1 1 0.4 c 4 3 0.1 ... I would like to analise the effect of two of them, keeping the

[R] references on cluster analysis

2004-02-07 Thread Giampiero Salvi
addressing this problem. I also read Milligan's chapter in the book Clustering and Classification from 1995, but didn't find information on this subject that wasn't included in the previous paper. Thank you very much, Giampiero _ Giampiero

[R] Re: multiple plots in different windows

2004-02-05 Thread Giampiero Salvi
, 5 Feb 2004, Giampiero Salvi wrote: Hi all, I'd like to generate a number of plots to compare different vectors I have stored in a list. To do this I do something like (in a linux system): for(i in 1:L) { X11() plot(listOfFunctions[[i]]) } First question is: is this the right way

[R] multiple plots in different windows

2004-02-05 Thread Giampiero Salvi
Hi all, I'd like to generate a number of plots to compare different vectors I have stored in a list. To do this I do something like (in a linux system): for(i in 1:L) { X11() plot(listOfFunctions[[i]]) } First question is: is this the right way to create several plots (in different windows) ?

[R] array of variable length vectors

2004-02-02 Thread Giampiero Salvi
_ Giampiero Salvi, M.Sc. www.speech.kth.se/~giampi Speech, Music and Hearing Tel: +46-8-790 75 62 Royal Institute of Technology Fax: +46-8-790 78 54 Drottning Kristinasv. 31, SE-100 44, Stockholm, Sweden __ [EMAIL PROTECTED

[R] R and unix tool 'screen'

2004-01-28 Thread Giampiero Salvi
the screen, there is no use to it either. Is there a way around this problem? Giampiero _ Giampiero Salvi, M.Sc. www.speech.kth.se/~giampi Speech, Music and Hearing Tel: +46-8-790 75 62 Royal Institute of Technology Fax

Re: [R] R and unix tool 'screen'

2004-01-28 Thread Giampiero Salvi
2004, Giampiero Salvi wrote: I have problems running R with screen. For those who don't know, screen is a unix tool that is quite handy if you want to leave a process (that outputs to tty) running when you logout, and then recover the session later on. It works like this: 1) run

[R] remote data I/O

2004-01-21 Thread Giampiero Salvi
Hi, I wonder if it is possible to read data on another computer (unix like system) using ssh (I mean any of ssh, scp, sftp). I saw that R has no problem reading files across the net (for example read.table(url(http://www...;)) ), but what if the file is on a local disk of another machine? For

Re: [R] remote data I/O

2004-01-21 Thread Giampiero Salvi
I solved my problem this way (if somebody is interested): pipe(ssh hostname 'cat path/filename')) I guess I could even use gzip instead of cat or the ssh option -C to compress the data that has to be transferred. R rocks! Giampiero On Wed, 21 Jan 2004, Giampiero Salvi wrote: Hi, I wonder

[R] reference to objects

2004-01-16 Thread Giampiero Salvi
Hi, is there a way to reference to a data object without copying it? For example I have a huge matrix called dist and I want two objects obj1 and obj2 to have a memeber dist that points to the matrix, but I don't want, for memory reasons, to copy the matrix twice. As far as I understand the

Re: [R] reference to objects

2004-01-16 Thread Giampiero Salvi
What is the problem you are trying to solve? Executive Consultant -- Office of Technology, Convergys [EMAIL PROTECTED] +1 (513) 723-2929 Giampiero Salvi [EMAIL PROTECTED]To: [EMAIL PROTECTED

Re: [R] reference to objects

2004-01-16 Thread Giampiero Salvi
the package developped by the author, Henrik Bengtsson HTH, Eric At 14:22 16/01/2004, Giampiero Salvi wrote: Hi, is there a way to reference to a data object without copying it? For example I have a huge matrix called dist and I want two objects obj1 and obj2 to have a memeber dist