Re: [R] saving plots as objects?

2004-02-27 Thread Prof Brian Ripley
On Fri, 27 Feb 2004, Deepayan Sarkar wrote: On Friday 27 February 2004 01:22, Prof Brian Ripley wrote: On Thu, 26 Feb 2004, Deepayan Sarkar wrote: On Thursday 26 February 2004 14:47, Rajarshi Guha wrote: Hi I had two questions regarding plots: * Is there are way to save a plot

Re: [R] saving plots as objects?

2004-02-27 Thread Deepayan Sarkar
On Friday 27 February 2004 01:59, Prof Brian Ripley wrote: On Fri, 27 Feb 2004, Deepayan Sarkar wrote: There has always been an update() method that's supposed to be used for this. No one uses it much, and it probably has a few bugs (but should be improved in time for R 1.9.0). From

[R] Get R.lib , how to generate it

2004-02-27 Thread pascal dessaux
Hello I want to use R as a library in a C/C++ ANSI ISO project I don't understand how can I generate R.lib with visual C++6 or C++.net; All libraires I've already used gave the two files: X.lib + X.dll then I 'am familiar to declare in the compiler: Project Properties-Linker-Input-Additional

Re: [R] locator(n=0)

2004-02-27 Thread Prof Brian Ripley
There is nothing in the design of R base graphics to report the current position of the mouse without clicking. Indeed, the graphics model does not presume a mouse and pointer (and probably dates from the days of cross-hairs manipulated with thumb wheels), and could conceivably use a

Re: [R] locator(n=0)

2004-02-27 Thread Barry Rowlingson
Peter Wolf wrote: locator(n=1) returns the coordinates of the position of the mouse. But you have to click the left button of the mouse. How can I determine the mouse position without any click? Is it possible to extend locator in a way that locator(n=0) outputs the coordinates at once, without

[R] Change the result data

2004-02-27 Thread Muhammad Subianto
Dear R-helper, I have a data like: hec.data -array(c(5,15,20,68,29,54,84,119,14,14,17,26,16,10,94,7), +dim=c(4,4), +dimnames=list(eye=c(Green,Hazel, Blue, Brown), +hair=c(Black, Brown, Red, Blond))) hec.data hair eye Black Brown Red Blond Green

Re: [R] nlme and multiple comparisons

2004-02-27 Thread Pedro J. Aphalo
I received some suggestions about how to do multiple comparisons, between levels of a factor used as explanatory variable in the fixed part of a model in an nlme fit. Many thanks! I also received a request to summarize. So, here is a summary of my attempts at following the suggestions, and

R: [R] Change the result data

2004-02-27 Thread Vito Muggeo
as.vector is a possible, simple solution Also use rep() on dimnames(hec.data)[[1]] to get the names vector with correct length a-matrix(1:15,ncol=5) a [,1] [,2] [,3] [,4] [,5] [1,]147 10 13 [2,]258 11 14 [3,]369 12 15 as.vector(a) [1] 1 2

RE: [R] Change the result data

2004-02-27 Thread John Fox
Dear Muhammad, One approach is: class(hec.data) - table as.data.frame(hec.data) I hope that this helps, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muhammad Subianto Sent: Friday, February 27, 2004 6:28 AM To: [EMAIL

Re: [R] Change the result data

2004-02-27 Thread Philipp Pagel
Using stack() would be a possibility: a - stack(as.data.frame(hec.data)) a$eye=rownames(hec.data) a values ind eye 1 5 Black Green 2 15 Black Hazel 3 20 Black Blue 4 68 Black Brown 5 29 Brown Green 6 54 Brown Hazel 7 84 Brown Blue 8 119 Brown

[R] Is there a way to deactivate partial matching in R?

2004-02-27 Thread Jens Oehlschlägel
Dear R-experts, I just tracked down a nasty bug in a dynamically parametrized function to wrong argument matching. As we get more and more complex applications build on top of R (like bioconductor) partial matching gets more and more dangerous. I would like to deactivate partial matching in R

Re: [R] Change the result data (thanks you)

2004-02-27 Thread Muhammad Subianto
Dear R-helper, I use like this below (from Prof. Peter Dalgaard) and thanks to other R-helper for your help. Best regard, Muhammad Subianto as.data.frame(as.table(hec.data)) eye hair Freq 1 Green Black5 2 Hazel Black 15 3 Blue Black 20

Re: [R] Is there a way to deactivate partial matching in R?

2004-02-27 Thread Marc Schwartz
On Fri, 2004-02-27 at 07:10, Jens Oehlschlgel wrote: Dear R-experts, I just tracked down a nasty bug in a dynamically parametrized function to wrong argument matching. As we get more and more complex applications build on top of R (like bioconductor) partial matching gets more and more

[R] no subject

2004-02-27 Thread Claudia Paladini
Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Status: No, hits=1.7 required=5.0 tests=AWL,BAYES_44,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63 X-Spam-Level: * Dear Ladies and

[R] question

2004-02-27 Thread Svetlana Eden
Hi everybody. The question: I get two vectors 'iFalseFalse' and 'i2'. I think they should be the same but they are not. Is it because R does not handle complicated logical expressions in such cases or I do something wrong? z1 = c(NA, , 3, NA, , 3) z2 = c(, , 3, NA, 3, NA) cV =

[R] How to save images?

2004-02-27 Thread Susan Lin
After I use function plot() to get an image, how can I save the image or export it to .gif or other digital formats? Thanks a lot. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

RE: [R] question

2004-02-27 Thread Austin, Matt
You want to use instead of . --Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Svetlana Eden Sent: Friday, February 27, 2004 7:57 AM To: r-help Subject: [R] question Hi everybody. The question: I get two vectors 'iFalseFalse' and 'i2'. I think they

Re: [R] How to save images?

2004-02-27 Thread Pedro Rodrigues
Maybe you could just PrintScreen or use the pdf() function which uses one or several pdf files instead of the default graphical device. After I use function plot() to get an image, how can I save the image or export it to .gif or other digital formats? Thanks a lot. --

Re: [R] question

2004-02-27 Thread Uwe Ligges
Svetlana Eden wrote: Hi everybody. The question: I get two vectors 'iFalseFalse' and 'i2'. I think they should be the same but they are not. Is it because R does not handle complicated logical expressions in such cases or I do something wrong? z1 = c(NA, , 3, NA, , 3) z2 = c(, , 3, NA, 3,

Re: [R] How to save images?

2004-02-27 Thread Paulo Justiniano Ribeiro Jr
Try this: jpeg(file1.jpg) plot(rnorm(20)) dev.off() and check the jpg file created by this. Also, check help files: ?jpeg ?postscript ?png On Fri, 27 Feb 2004, Susan Lin wrote: After I use function plot() to get an image, how can I save the image or export it to .gif or other digital

RE: [R] How to save images?

2004-02-27 Thread Liaw, Andy
On Windows, use the `File' menu. On other platforms, see the help page for dev.copy, png, jpeg, and bitmap. HTH, Andy From: Susan Lin After I use function plot() to get an image, how can I save the image or export it to .gif or other digital formats? Thanks a lot.

Re: [R] How to save images?

2004-02-27 Thread Timur Elzhov
On Fri, Feb 27, 2004 at 08:05:10AM -0800, Susan Lin wrote: After I use function plot() to get an image, how can I save the image or export it to .gif or other digital formats? ?device -- WBR, Timur __ [EMAIL PROTECTED] mailing list

RE: [R] How to save images?

2004-02-27 Thread Andy Bunn
Try the FAQ http://cran.r-project.org/faqs.html Or one of the manuals http://cran.r-project.org/faqs.html But first read the posting guide http://www.R-project.org/posting-guide.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Lin Sent:

Re: [R] load data for mypkg-Ex.R

2004-02-27 Thread Thomas Lumley
On Fri, 27 Feb 2004, Jason Sinnwell wrote: Using R 1.7.1 in Solaris I'm developing a package for both Splus and R, and I'm trying to use all the same files for R and Splus, both function files and help files. I have two questions. 1) The file made by R CMD check to run .Rd-examples posts

[R] question about setdiff()

2004-02-27 Thread Svetlana Eden
Thank you for your answers, I have another question: the behaviour of setdiff(indicesFalse, indicesNA) does not seem predictable to me. indices [1] 1 2 3 4 5 6 compareVector [1]NA TRUE TRUE TRUE FALSENA indicesNA = indices[is.na(compareVector)] indicesNA [1] 1 6

[R] question about if else

2004-02-27 Thread Svetlana Eden
Today is a good day for asking question, I guess. c() NULL length(c())==0 [1] TRUE r = ifelse(length(c())!=0, c(), c(1,2)) ### OK r = c() ### OK r = ifelse(length(c())==0, c(), c(1,2)) ### why this is not OK (given the previous two)? Error in

RE: [R] question about setdiff()

2004-02-27 Thread Liaw, Andy
`Same' object appearing more than once do not count, I guess. As an example: setdiff(c(1,2,2), c(3,4)) [1] 1 2 The second `2' does not show up, because setdiff function (x, y) unique(if (length(x) || length(y)) x[match(x, y, 0) == 0] else x) environment: namespace:base Note the unique().

Re: [R] load data for mypkg-Ex.R

2004-02-27 Thread Prof Brian Ripley
On Fri, 27 Feb 2004, Jason Sinnwell wrote: Using R 1.7.1 in Solaris I'm developing a package for both Splus and R, and I'm trying to use all the same files for R and Splus, both function files and help files. I have two questions. 1) The file made by R CMD check to run .Rd-examples

RE: [R] question about if else

2004-02-27 Thread Liaw, Andy
You need to (re-)read ?ifelse. In ifelse(L, v1, v2), L is suppose to be a vector of logicals (or an expression that evaluates to one), and v1 and v2 are vectors of same length as L; i.e., ifelse() vectorizes if ... else In the first case: r = ifelse(length(c())!=0, c(), c(1,2))

Re: [R] question about if else

2004-02-27 Thread Don MacQueen
ifelse() has three arguments, named 'test', 'yes', and 'no'. In both of your two examples, you gave it a test argument of length equal to 1. That is, both length(c())!=0 and length(c())==0 are expressions which when evaluated have length equal to 1. Therefore, the ifelse() function wants to

Re: [R] How to recover t-statistics?

2004-02-27 Thread Sundar Dorai-Raj
Joseph J. Gazaille wrote: Hi! I'm doing Monte Carlo analyses of the distribution of the t-statistics of the parameters of models evaluated with the lm( ) function. Is there an easy way to recover the t-statistics (similarly to using coef to recover the coefficients)? Thanks, joseph Try

Re: [R] How to recover t-statistics?

2004-02-27 Thread Prof Brian Ripley
On Fri, 27 Feb 2004, Joseph J. Gazaille wrote: Hi! I'm doing Monte Carlo analyses of the distribution of the t-statistics of the parameters of models evaluated with the lm( ) function. Is there an easy way to recover the t-statistics (similarly to using coef to recover the

Re: [R] How to recover t-statistics?

2004-02-27 Thread Remington, Richard
Joseph J. Gazaille wrote: Hi! I'm doing Monte Carlo analyses of the distribution of the t-statistics of the parameters of models evaluated with the lm( ) function. Is there an easy way to recover the t-statistics (similarly to using coef to recover the coefficients)? Thanks, joseph

Re: [R] load data for mypkg-Ex.R

2004-02-27 Thread Roger Koenker
On a related note is there a convention for cleaning up the detritus after running example(foo) I suppose sometimes users would like to have access to the objects that were created in the course of this, but perhaps more likely they would prefer that they were vaporized. I'm

[R] Johansen Procedure

2004-02-27 Thread Erik Johnson
I noticed a post about the Johansen procedure for cointegration.(or lack there of) from Nov 2003. Is anyone aware of any implemenation of this in R at this time? If not, could someone please send me in a specific direction for creating/implementing a new procedure. Thanks alot. --

[R] a loop question

2004-02-27 Thread Susan Lin
I want to get three .gif image files test.1.gif, test.2.gif, test.3.gif by using a loop. The code I tried is like this: x=c(0, 1, 2, 3, 4) y=c(1, 2, 3, 4) for(i in 1:3) { x11() jpeg(test.i.gif) plot(x, y) dev.off() } but I only

Re: [R] load data for mypkg-Ex.R

2004-02-27 Thread A.J. Rossini
You mean, example(foo,local=TRUE) ? Roger Koenker [EMAIL PROTECTED] writes: On a related note is there a convention for cleaning up the detritus after running example(foo) I suppose sometimes users would like to have access to the objects that were created in the course

Re: [R] a loop question

2004-02-27 Thread Achim Zeileis
On Fri, 27 Feb 2004 13:09:40 -0800 (PST) Susan Lin wrote: I want to get three .gif image files test.1.gif, test.2.gif, test.3.gif by using a loop. The code I tried is like this: x=c(0, 1, 2, 3, 4) y=c(1, 2, 3, 4) for(i in 1:3) { x11()

RE: [R] a loop question

2004-02-27 Thread Ko-Kang Kevin Wang
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Lin Sent: Saturday, February 28, 2004 10:10 AM To: [EMAIL PROTECTED] Subject: [R] a loop question I want to get three .gif image files test.1.gif, test.2.gif, test.3.gif by using a loop. The

[R] browseURL question

2004-02-27 Thread jtleek
I have a quick question about the browseURL function. When I use the function in a UNIX environment, I have to use two sets of quotations if I have the symbol in the URL. For Windows I only need to use the first set. For example, on Windows:

Re: [R] unable to install dse in mac OS X 10.3

2004-02-27 Thread Paul Gilbert
I'm not familiar with mac, but I think this is a problem with your compiler or its configuration. I expect you will have the difficulty with all packages that need compiled fortran. Another user with a similar (but not the same) problem reported getting better errror messages by running the

[R] importing S-Plus data files

2004-02-27 Thread Demiurg [at Yahoo]
I have some data in the Linux version of S-Plus, which I can not use anymore. The program is just broken and won't run. I'm trying to find a way to import that data to either Windows version of S-Plus (which I have running on my other machine) or R (Linux or Windows, it doesn't matter).

RE: [R] importing S-Plus data files

2004-02-27 Thread Liaw, Andy
You can help yourself to help us by at least telling us what versions of S-PLUS on Linux the data were created from, the version of S-PLUS you are using under Windows (which version of Windows?) and the version of R you are using. I believe starting in S-PLUS 6.1, the data created by S-PLUS is

[R] matrix inverse in C

2004-02-27 Thread Kosuke Imai
Hi, I'm writing an R package using the C code i've written. I'm wondering if anyone knows an easy way to calculate an inverse and cholesky factor of a matrix using the Fortran/C library of R: and how to call them from C. My code is based on the Numerical Reciepe code, and I'm trying to use

[R] logististic regression (GLM). How to get 95 pct. confidence limits?

2004-02-27 Thread Niels Steen Krogh
Dear R-list. I'm doing af logistic analyses using gml. The model explaines variations in Adverse events infections (0 og 1) using age as explanatory variable. model2d-glm(formula=AEorSAEInfecBac~Age,family=binomial(logit),data=emrisk) I want to get predictions with 95% confidence limits for

RE: [R] importing S-Plus data files

2004-02-27 Thread Alexander Sirotkin \[at Yahoo\]
S-Plus version is 6.1 (on both Linux and Windows), R is 1.8.1. It's Win2K, although I don't think it matters. Thanks. --- Liaw, Andy [EMAIL PROTECTED] wrote: You can help yourself to help us by at least telling us what versions of S-PLUS on Linux the data were created from, the version of

[R] LME, where is the package?

2004-02-27 Thread Yong Wang
Hi, all My R 1.7.1 can not find lme, I just downloaded and installed the file lme4 from Crane, is this the same as lme? the problem is R still print no function named lme, how should I do. thank you __ [EMAIL PROTECTED] mailing list