Hello R users, I have three questions and I would be grateful if someone could give me an answer to each of these. 1) I have constracted a function that returns an output, which runs in a while( condition ){ run function } loop. I would like to know if there is a way to get the outputs in different windows, every time the function runs, so as to compare easier the results. 2) In my function I make use of the Rcmdr package. But every time I use my function and the Rcmdr package loads, I get the R-commander window and I have to delete it every time. So I wonder if there is a way to avoid R-commander window every time I load the Rcmdr package. 3) My final question is if there is a function in R that computes the Mallow's Cp statistic. I have already found AIC and BIC but not Mallow's Cp. Furthermore I found leaps() function but it is not exactly what I want. Thank you for you attention.I will looking forward for some answers. --------------------------------- ÁðïêôÞóôå ôçí äùñåÜí óáò@yahoo.gr [[alternative HTML version deleted]]
> 1) I have constracted a function that returns an output, which runs in a while( condition ){ run function }> loop. I would like to know if there is a way to get the outputs in differentwindows, every time the function> runs, so as to compare easier the results.Try windows(). But better don't use it, R has much better tools to compare outputs; trellis' plots (?lattice) main use is to make nicely comparable output. Dieter
Please learn to wrap your emails at about 72 characters. See below for other comments. On Thu, 2004-12-16 at 08:29, vasilis pappas wrote:> Hello R users, > > I have three questions and I would be grateful if someone could give me an answer to each of these. > > 1) I have constracted a function that returns an output, which runs in a while( condition ){ run function } loop. I would like to know if there is a way to get the outputs in different windows, every time the function runs, so as to compare easier the results.This depends on what you mean by 'output'. If you mean graphs, then you can use x11() if you have X Window systems or windows() if you are in Windows OS. windows() plot(1:10) windows() plot(rnorm(1000)) Or you could use the mfrow option in par() to split the plotting window par(mfrow=c(1,2) plot(1:10) plot(rnorm(1000)) If your output is not graphical, then you can save to a file and compare them or save it to a list/matrix in R.> 2) In my function I make use of the Rcmdr package. But every time I use my function and the Rcmdr package loads, I get the R-commander window and I have to delete it every time. So I wonder if there is a way to avoid R-commander window every time I load the Rcmdr package. > > 3) My final question is if there is a function in R that computes the Mallow's Cp statistic. I have already found AIC and BIC but not Mallow's Cp. Furthermore I found leaps() function but it is not exactly what I want.There is a function called mle.cp in the package wle. Not sure if this does what you want.> Thank you for you attention.I will looking forward for some answers. > > > > > --------------------------------- > > @yahoo.gr > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Dear Vasilis,> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of vasilis pappas > Sent: Thursday, December 16, 2004 3:30 AM > To: r-help at stat.math.ethz.ch > Subject: [R] 3 questions. . .> > 2) In my function I make use of the Rcmdr package. But every > time I use my function and the Rcmdr package loads, I get > the R-commander window and I have to delete it every time. So > I wonder if there is a way to avoid R-commander window every > time I load the Rcmdr package. >You could remove the .onAttach() function from the package, which calls Commander() to start the Rcmdr GUI. Because Commander() performs a variety of initialisations, however, your function may not work properly in its absence. It's not possible to know whether you'll run into problems without knowing what you're using in the Rcmdr package. I hope that this helps, John -------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox