Re: [R] pairwise difference operator

2004-07-30 Thread Gabor Grothendieck
Adaikalavan Ramasamy cancer.org.uk> writes: : : There was a BioConductor thread today where the poster wanted to find : pairwise difference between columns of a matrix. I suggested the slow : solution below, hoping that someone might suggest a faster and/or more : elegant solution, but no other

Re: [R] pairwise difference operator

2004-07-30 Thread Marc Schwartz
On Fri, 2004-07-30 at 18:30, Adaikalavan Ramasamy wrote: > There was a BioConductor thread today where the poster wanted to find > pairwise difference between columns of a matrix. I suggested the slow > solution below, hoping that someone might suggest a faster and/or more > elegant solution, but n

[R] pairwise difference operator

2004-07-30 Thread Adaikalavan Ramasamy
There was a BioConductor thread today where the poster wanted to find pairwise difference between columns of a matrix. I suggested the slow solution below, hoping that someone might suggest a faster and/or more elegant solution, but no other response. I tried unsuccessfully with the apply() family

Re: [R] Transparent backgrounds in png files

2004-07-30 Thread Marc Schwartz
Patrick, Here is one additional option for you. I happened to be doing some searching on the OO.org site today for some printing related issues in their Bugzilla equivalent. There was a reference to a MS Office PDF import filter available from ScanSoft that would enable you to create PDF vector

Re: [R] Three-way ANOVA?

2004-07-30 Thread Rolf Turner
> I'm a biologist, so please forgive me Biologists are hard to forgive! :-) >if my question sounds absurd! The only absurd question is the one that is not asked. > I have 3 parameters x1, x2, x3 and a response variable y.The > sample size

[R] R question......

2004-07-30 Thread rebhi bsharat
Hi; Is there a faster way to run this code? Ab<- matrix(numeric(1),nrow=2,ncol=1000) Bb<- matrix(numeric(1),nrow=2,ncol=1000) for(j in 1:1000) { for(i in 1:1000) { eq<- sample(stud,replace=T) ystar<- beta.r*x+eq+b0 Ab[,i]<- wwfit(x,ystar)$coef

[R] Three-way ANOVA?

2004-07-30 Thread e . rapsomaniki
Hi, I'm a biologist, so please forgive me if my question sounds absurd! I have 3 parameters x1, x2, x3 and a response variable y.The sample size is 75. I tried to do the following: mylm<-lm(y~ x1 + x2 + x3, data="mydata") but i can only get stats from anova for the first 2 variables. The third c

Re: [R] cannot print/save graphics.

2004-07-30 Thread Jean Eid
You have to have postscript("foo.eps", ..) before you issue the plot commands and isuue a dev.off() at the end. If you want to copy the plot graph to a postscript driver use dev.copy2eps(file="foo.eps") ?dev.print ?postscript Hope this helps. On Fri, 30 Jul 2004, marzban wrote: > > Hi,

[R] cannot print/save graphics.

2004-07-30 Thread marzban
Hi, I'm running the latest version of R on a linux box. plot() does produce a grahpics window. But is it "normal" for that window to not respond to a left or right mouse click? What I'm really trying to do is the save the graphics to a postscript file, but postscript() produces an "empty posts

Re: [R] legend under plot region?

2004-07-30 Thread partha_bagchi
Have a look at ?par You need to have par(xpd = TRUE) and then use par("usr") to get the coordinates for the edges of the plot. Also make sure you have enough space around the plot to put the legend. For that, have a look at par(oma) or par(mar) etc. HTH. Partha Jean Eid <[EMAIL PROTECTE

[R] legend under plot region?

2004-07-30 Thread Jean Eid
I am trying to put legends underneath the plot (in the outer margins). Is there an easy way to do this. I have been tinkering with split..screen but I could not make it work. Thank in advance Jean __ [EMAIL PROTECTED] mailing list https://www.stat.math

[R] a question about nlme

2004-07-30 Thread Lijuan Wang
Hi, Sorry to bother those who are not interested in the question. I am using R to run a multiphase mixed-effects model. I simulated a data set by using the following model. And now I want to use R to estimate the parameters and compare the results with the true values. The equations of the mo

Re: [R] unwanted as.integer

2004-07-30 Thread Thomas Lumley
Surely it's simply just to use as.numeric() to stop them being integers? This is fixed in r-devel anyway -- you have a choice of a bunch of deparsing options. -thomas On Fri, 30 Jul 2004, Sundar Dorai-Raj wrote: > > > Jack Tanner wrote: > > > Sundar Dorai-Raj wrote: > > > >> Not sure

Re: [R] Subsetting dataframe

2004-07-30 Thread Thomas Lumley
On Fri, 30 Jul 2004 [EMAIL PROTECTED] wrote: > Dear R-help, > > I have a question on subsetting a dataframe and I searched all of R-help to no > avail. Please view the following example dataframe: > > # Example > > x <- factor(rep(c(1,2,3,4),2)) > > y <- c(1,4,3,2,1,2,5,1,2) > > z <- c(10,12,18,

Re: [R] Counting question

2004-07-30 Thread Gabor Grothendieck
Gabor Grothendieck myway.com> writes: : : Adair, Laurence parsons.com> writes: : : > Here is something that sounds simple, but I'm having trouble getting it. I : > have a data frame with two columns, the first is date and the second is : > employee ID. I'd like to plot date on the horizontal

Re: [R] unwanted as.integer

2004-07-30 Thread Sundar Dorai-Raj
Jack Tanner wrote: Sundar Dorai-Raj wrote: Not sure about what sqlQuery is doing but you can wrap your return value in a eval(parse(text = x)) to evaluate the "as.integer(.)" string. As in, a <- eval(parse(text = a)) This works, except it doesn't. > a <- sqlQuery(irrdb, "select count(field) f

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread F Duan
Thank all of you. That's exactly what I want. Best, Frank Quoting Gavin Simpson <[EMAIL PROTECTED]>: > F Duan wrote: > > Dear All, > > > > I am sorry if this question has been asked before. Below is my Question: > > > > I want to put several plots in the same window, but I don’t want the bla

Re: [R] Counting question

2004-07-30 Thread Gabor Grothendieck
Adair, Laurence parsons.com> writes: > Here is something that sounds simple, but I'm having trouble getting it. I > have a data frame with two columns, the first is date and the second is > employee ID. I'd like to plot date on the horizontal axis, employee ID on > the vertical axis, and the nu

[R] Subsetting dataframe

2004-07-30 Thread Davaren1
Dear R-help, I have a question on subsetting a dataframe and I searched all of R-help to no avail. Please view the following example dataframe: # Example > x <- factor(rep(c(1,2,3,4),2)) > y <- c(1,4,3,2,1,2,5,1,2) > z <- c(10,12,18,21,24,32,34,12,23) > test <- data.frame(x, y, z) > test x y

Re: [R] Counting question

2004-07-30 Thread Deepayan Sarkar
On Friday 30 July 2004 10:13, Adair, Laurence wrote: > Hi All, > > Here is something that sounds simple, but I'm having trouble getting > it. I have a data frame with two columns, the first is date and the > second is employee ID. I'd like to plot date on the horizontal axis, > employee ID on the

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread Gavin Simpson
F Duan wrote: Dear All, I am sorry if this question has been asked before. Below is my Question: I want to put several plots in the same window, but I don’t want the blank space between plots (like par(mfrow=)) --- that makes the plots too small. Could anyone tell me how to do it? Thanks a lot.

Re: [R] unwanted as.integer

2004-07-30 Thread Jack Tanner
Sundar Dorai-Raj wrote: Not sure about what sqlQuery is doing but you can wrap your return value in a eval(parse(text = x)) to evaluate the "as.integer(.)" string. As in, a <- eval(parse(text = a)) This works, except it doesn't. > a <- sqlQuery(irrdb, "select count(field) from mytable where field

RE: [R] LaTeX in R

2004-07-30 Thread Roy, Supratik
Sorry!, by "TeX" I meant the PicTeX option for graphics devices (which in anycase produces bulky files!). -Original Message- From: Uwe Ligges To: Roy, Supratik Cc: '[EMAIL PROTECTED]' Sent: 7/30/2004 3:58 PM Subject: Re: [R] LaTeX in R Roy, Supratik wrote: > I tried to include LaTeX expr

Re: [R] dynamic regression

2004-07-30 Thread Achim Zeileis
On Fri, 30 Jul 2004 08:13:05 -0700 (PDT) bob mccall wrote: > Greetings: > > Is there an simple way to do dynamic regressions in R? > >From what I've seen, one must use arima() and construct the X matrix > >with lagged values etc. and modify Y as well. If you want OLS regression with lagged reg

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread Marc Schwartz
On Fri, 2004-07-30 at 10:41, F Duan wrote: > Dear All, > > I am sorry if this question has been asked before. Below is my Question: > > I want to put several plots in the same window, but I dont want the blank > space between plots (like par(mfrow=)) --- that makes the plots too small. > Could

[R] plot() core dump

2004-07-30 Thread Liao, Kexiao
Dear R Development Team, I compile R-1.9.1 on AIX 5.2 under 2.9-aix51-020209, and xlf 7.1. In order to let R compile successfully under gcc 2.9, I have to change one C statement of file(RHOME//src/modules/X11/devX11.c) line 1768 from "retrun FALSE" to "retrun NULL", following is C code snapshot

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread Sean Davis
Frank, Why not try using grid graphics? You can open arbitrary viewports into which to place plots. Sean On Jul 30, 2004, at 11:41 AM, F Duan wrote: Dear All, I am sorry if this question has been asked before. Below is my Question: I want to put several plots in the same window, but I don’t wa

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread Uwe Ligges
F Duan wrote: Dear All, I am sorry if this question has been asked before. Below is my Question: I want to put several plots in the same window, but I don’t want the blank space between plots (like par(mfrow=)) --- that makes the plots too small. Could anyone tell me how to do it? E.g. with par(m

RE: [R] How to put multiple plots in the same window? (not par(mf row=))

2004-07-30 Thread Austin, Matt
Lattice graphics may be the answer depending on your exact problem. Here is an example of four traditional plots without space: par(mfrow=c(2,2), omi=c(.5, .5, .5, .5)) par(mar=c(0, 2, 2, 0)) plot(rnorm(10), rnorm(10), axes=FALSE) box(); axis(2); axis(3) par(mar=c(0, 0, 2, 2)) plot(rnorm(10

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread Thomas Lumley
On Fri, 30 Jul 2004, F Duan wrote: > Dear All, > > I am sorry if this question has been asked before. Below is my Question: > > I want to put several plots in the same window, but I don’t want the blank > space between plots (like par(mfrow=)) --- that makes the plots too small. > Could anyone tel

Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread Sundar Dorai-Raj
F Duan wrote: Dear All, I am sorry if this question has been asked before. Below is my Question: I want to put several plots in the same window, but I don’t want the blank space between plots (like par(mfrow=)) --- that makes the plots too small. Could anyone tell me how to do it? Thanks a lot.

[R] P-value from the joint cumulative distribution of an n-dimensional order statistic

2004-07-30 Thread Jeroen Van Goey
Hello, I want to compute the P-value from the joint cumulative distribution of an n-dimensional order statistic in R, using the formula found on http://cmgm.stanford.edu/%7Ekimlab/multiplespecies/Supplement/methods_network.html My data consists of three different techniques (G2D, POCUS and RANDO

Re: [R] LaTeX in R

2004-07-30 Thread Thomas Lumley
On Fri, 30 Jul 2004, Roy, Supratik wrote: > > I tried to include LaTeX expressions in the header of a plot in R. > (1) Using PlotMath, LaTeX type expressions, e.g., R^x is possible, however, > dist<-"" (some string) > main=expression(R^x,dist) > does not substitute the value of dist, a

[R] FWER + multiple linear models

2004-07-30 Thread Serguei Baranov
Could someone kindly help me with the following question: when I analyze microarray data I need to fit multiple linear regression models between genes and clinical patameters followed by estimation of the p-values. What's the solution to implement Westfall and Young's algorithm + resampling into

RE: [R] dynamic regression

2004-07-30 Thread John Fox
Dear Bob, If you mean regression with autocorrelated errors, take a look at the gls (generalised least squares) function in the nlme package. I hope this helps, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of bob mccall > Sent: Friday, July

[R] How to put multiple plots in the same window? (not par(mfrow=))

2004-07-30 Thread F Duan
Dear All, I am sorry if this question has been asked before. Below is my Question: I want to put several plots in the same window, but I don’t want the blank space between plots (like par(mfrow=)) --- that makes the plots too small. Could anyone tell me how to do it? Thanks a lot. Frank

Re: [R] Counting question

2004-07-30 Thread Thomas Lumley
On Fri, 30 Jul 2004, Adair, Laurence wrote: > Hi All, > > Here is something that sounds simple, but I'm having trouble getting it. I > have a data frame with two columns, the first is date and the second is > employee ID. I'd like to plot date on the horizontal axis, employee ID on > the vertica

[R] FWER + multiple linear models

2004-07-30 Thread Serguei Baranov
Could someone kindly help me with the following question: when I analyze microarray data I need to fit multiple linear regression models between genes and clinical patameters followed by estimation of the p-values. What's the solution to implement Westfall and Young's algorithm + resampling into

Re: [R] using Rterm under cygwin, no possiblity to delete characters

2004-07-30 Thread Dirk Eddelbuettel
On Fri, Jul 30, 2004 at 11:37:32AM +0200, Dewez Thomas wrote: > Dear R-users, > > Thanks to Roger Bivand, it appears that the real problem is coming from the > way R talks to X11 under cygwin. Both other invocations of Rterm, either in > a bash window without Xwindow capability or from the DOS com

[R] Counting question

2004-07-30 Thread Adair, Laurence
Hi All, Here is something that sounds simple, but I'm having trouble getting it. I have a data frame with two columns, the first is date and the second is employee ID. I'd like to plot date on the horizontal axis, employee ID on the vertical axis, and the number of times the employee appears for

[R] dynamic regression

2004-07-30 Thread bob mccall
Greetings: Is there an simple way to do dynamic regressions in R? >From what I've seen, one must use arima() and construct the X matrix with lagged >values etc. and modify Y as well. Thanks, Bob - [[alternative HTML version deleted

RE: [R] optimisation procedure with flat log-likelihood

2004-07-30 Thread Gabor Grothendieck
Two things to try: 1. Try transforming the parameters. It may be that one or more parameters transformed by log or reciprocal, say, will improve the objective function from the optimizer's viewpoint. 2. specify the gradient explicitly. If its complicated but not too complicated you might try

Re: [R] LaTeX in R

2004-07-30 Thread Uwe Ligges
Roy, Supratik wrote: I tried to include LaTeX expressions in the header of a plot in R. (1) Using PlotMath, LaTeX type expressions, e.g., R^x is possible, however, dist<-"" (some string) main=expression(R^x,dist) does not substitute the value of dist, as well do the proper superscriptin

Re: [R] lme: problems with corARMA

2004-07-30 Thread Douglas Bates
Stephan Moratti wrote: Trying following example from Pinheiro and Bates in order to fit an ARMA(1,1) model: library(nlme) fm1Ovary.lme<-lme(follicles~sin(2*pi*Time)+cos(*pi*Time),data=Ovary,random=p dDiag(~sin(2*pi*Time))) fm5Ovary.lme<-update(fm1Ovary.lme,corr=corARMA(p=1,q=1)) I get follwing erro

[R] LaTeX in R

2004-07-30 Thread Roy, Supratik
I tried to include LaTeX expressions in the header of a plot in R. (1) Using PlotMath, LaTeX type expressions, e.g., R^x is possible, however, dist<-"" (some string) main=expression(R^x,dist) does not substitute the value of dist, as well do the proper superscripting. Also within an ex

RE: [R] a question about identify and locator

2004-07-30 Thread John Fox
Dear Uwe and Jordi, It is possible to get close to what Jordi wants using the tcltk package: IDPoints <- function(x, y, labels){ top <- tktoplevel() tkwm.title(top, "Coordinates") coords <- tclVar("") coordsEntry <- tkentry(top, width="25", textvariable=coords) Stop <- tclVar(

Re: [R] a question about identify and locator

2004-07-30 Thread Uwe Ligges
Molins, Jordi wrote: Hello, I use R 1.9.1 on Windows 2000. I have a chart that I am looking. I use identify() and locator() to find out the (x,y) values of interesting points in the chart, but these functions are not always helpful (e.g., sometimes identify() prints on top of the chart, making the

Re: [R] classification trees

2004-07-30 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: I'm working with S-Plus 6 in Windows. Does anyone know if the prune.tree or prune.misclass function automatically cross-validates or do you have to use cv.tree if you want to do cross-validation? This mailing list is about R. There is, e.g., the s-news lists for questions

RE: [R] using Rterm under cygwin, no possiblity to delete characters

2004-07-30 Thread Dewez Thomas
Dear all again, Here is a wrap-up of the fact finding mission Roger and I led over the last two days (see his reply below my email). The issue was the following: --- 1. Rterm breaks down when invoked from Xwindow under Cygwin. This is a typical Cygwin problem and does not

[OT] Re: [R] Transparent backgrounds in png files

2004-07-30 Thread tobias . verbeke
[EMAIL PROTECTED] wrote on 30/07/2004 05:34:32: > Are the Windows recipients of the R graphics involved in > creating/editing the resultant documents, or do they simply require > "read only" access of a final document? > > If the latter, then let me suggest that you generate EPS based grap

Re: [R] Debug S4 Methods

2004-07-30 Thread John Chambers
Gunnar Wrobel wrote: > > Dear list, > > is there any way to debug the S4 methods using the debug() function in > R1.9.1? > > I am able to use browser() inside a S4 method but I wondered if there is > a way to debug the function without recompiling the package. Yes. Use the trace() function to

[R] optimisation procedure with flat log-likelihood

2004-07-30 Thread Camarda, Carlo Giovanni
Dear R-friends, I use optim(par=c(mystartingpoints), fn=myloglikelihoodfunction, gr=NULL, method=c("L-BFGS-B"), ## I would like to do not use any bounds control=list(trace=6, ## just to see what it's going on maxit=c(2))

[R] classification trees

2004-07-30 Thread hmmunro
I'm working with S-Plus 6 in Windows. Does anyone know if the prune.tree or prune.misclass function automatically cross-validates or do you have to use cv.tree if you want to do cross-validation? Heather __ [EMAIL PROTECTED] mailing list https://www.st

[R] lme: problems with corARMA

2004-07-30 Thread Stephan Moratti
Trying following example from Pinheiro and Bates in order to fit an ARMA(1,1) model: library(nlme) fm1Ovary.lme<-lme(follicles~sin(2*pi*Time)+cos(*pi*Time),data=Ovary,random=p dDiag(~sin(2*pi*Time))) fm5Ovary.lme<-update(fm1Ovary.lme,corr=corARMA(p=1,q=1)) I get follwing error message: Error in

[R] a question about identify and locator

2004-07-30 Thread Molins, Jordi
Hello, I use R 1.9.1 on Windows 2000. I have a chart that I am looking. I use identify() and locator() to find out the (x,y) values of interesting points in the chart, but these functions are not always helpful (e.g., sometimes identify() prints on top of the chart, making the number illegible).

Re: [R] using Rterm under cygwin, no possiblity to delete characters

2004-07-30 Thread Peter Dalgaard
Dewez Thomas <[EMAIL PROTECTED]> writes: > + Rterm dies when hitting return after correcting typos > the error message then is: > --- > Error: syntax error > Execution halted > --- > > This suggests that Rterm is by-passing fvwm2 and the X11 environment to talk > to windows directly. This is also

RE: [R] using Rterm under cygwin, no possiblity to delete characters

2004-07-30 Thread Roger Bivand
On Fri, 30 Jul 2004, Dewez Thomas wrote: > Dear R-users, > > Thanks to Roger Bivand, it appears that the real problem is coming from the > way R talks to X11 under cygwin. Both other invocations of Rterm, either in > a bash window without Xwindow capability or from the DOS command, work just > fi

RE: [R] using Rterm under cygwin, no possiblity to delete characters

2004-07-30 Thread Dewez Thomas
Dear R-users, Thanks to Roger Bivand, it appears that the real problem is coming from the way R talks to X11 under cygwin. Both other invocations of Rterm, either in a bash window without Xwindow capability or from the DOS command, work just fine. Rterm breaks down every time it is invoked from a

Re: [R] perl script in exec/

2004-07-30 Thread Uwe Ligges
Jason Sinnwell wrote: Dear useRs- I am developing a package that uses output from stand-alone unix software programs. I use multiple perl scripts to process the output and make it ready for reading into R. I would like to keep the perl scripts in the designated place for such files, exec/, but

RE: [R] unwanted as.integer

2004-07-30 Thread Henrik Bengtsson
I suspect sqlQuery() returns a data frame, is that correct? Then try to convert it into a matrix before you paste() it. Example: > x <- data.frame(a=1:3, b=1:3+0.5) > as.character(x) [1] "as.integer(c(1, 2, 3))" "c(1.5, 2.5, 3.5)" > as.character(as.matrix(x)) [1] "1" "2" "3" "1.5" "2.5" "3.5

Re: [R] expression + paste + arguments + ...

2004-07-30 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: dear R wizards: I would like to write a function that roughly places the equivalent of the following latex text into the current plot: \newcommand{ \placesigma }[4]{ \put(\#1,\#2){ \sigma_{A , #3} = #4 } ??? You are "just" defining a new LaTeX command ... nothing will