Re: [R] Expression for pedices

2007-04-15 Thread Duncan Murdoch
On 4/15/2007 2:05 PM, Cressoni, Massimo (NIH/NHLBI) [F] wrote: > I know that this maybe a trivial question. I am not able to plot pedices in > graph axes. > Instead I am able to plot different math symbols : I think you mean subscripts. > > XLABEL <- expression(paste(cmH,lim(f(x), x %->% 0),"O

[R] Expression for pedices

2007-04-15 Thread Cressoni, Massimo \(NIH/NHLBI\) [F]
I know that this maybe a trivial question. I am not able to plot pedices in graph axes. Instead I am able to plot different math symbols : XLABEL <- expression(paste(cmH,lim(f(x), x %->% 0),"O PEEP")) works well XLABEL <- expression(paste(cmH,[2],"O PEEP")) is considered a wrong expression. Th

Re: [R] expression()

2006-12-13 Thread Paul Murrell
Hi javier garcia-pintado wrote: > Thanks you, > this works right. > > I just would like to note one thing: > although I've found italic() in the help for plotmath and I can see that > the italic function: > > mtext(expression(italic(beta)[max]),side=1,line=2) > > does not work on the greek bet

Re: [R] expression()

2006-12-13 Thread Prof Brian Ripley
On Wed, 13 Dec 2006, javier garcia-pintado wrote: > Thanks you, > this works right. > > I just would like to note one thing: > although I've found italic() in the help for plotmath and I can see that > the italic function: > > mtext(expression(italic(beta)[max]),side=1,line=2) > > does not work on

Re: [R] expression()

2006-12-13 Thread javier garcia-pintado
Thanks you, this works right. I just would like to note one thing: although I've found italic() in the help for plotmath and I can see that the italic function: mtext(expression(italic(beta)[max]),side=1,line=2) does not work on the greek beta character. Though not strictly necessary, this woul

Re: [R] expression()

2006-12-12 Thread Scionforbai
Hallo, for the first question: mtext(expression(beta[max]),side=1,line=2) and: ?plotmath demo(plotmath) for the second. Hope it helped, Scionforbai __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] expression()

2006-12-12 Thread Benilton Carvalho
mtext(expression(beta[max]), side=1, line=2) is it what you want? b On Dec 12, 2006, at 10:59 AM, javier garcia-pintado wrote: > Hi, > I'm trying to use expression() to write a text to a graphic in the > margin. > > Using: > > mtext(expression(beta),side=1,line=2) > > writes a perfect beta gr

[R] expression()

2006-12-12 Thread javier garcia-pintado
Hi, I'm trying to use expression() to write a text to a graphic in the margin. Using: mtext(expression(beta),side=1,line=2) writes a perfect beta greek character, but I need to add a subindex "max", and I'm trying: mtext(paste(expression(beta),"max"),side=1,line=2) simply writes "beta max" in

Re: [R] Expression

2006-11-30 Thread Peter Dalgaard
t; 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. > Well, ?plotmath does say A mathematical expression must obey the normal rules of syntax for

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 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

[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] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 19:44 +0100, Prof Brian Ripley wrote: > On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: > > > On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: > > > I've tried several different ways to accomplish this, but as yet to no > > > avail. My y-axis for a plot has a rather

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Prof Brian Ripley
On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: > On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: > > I've tried several different ways to accomplish this, but as yet to no > > avail. My y-axis for a plot has a rather long label, and thus I have > > been using "/n" to break it into two l

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Andrew Kniss
Thank you Marc and Gabor. Both suggestions work well. I will use the 'atop' solution, as it requires the least amount of typing to change my current ylabs. Andrew Marc Schwartz (via MN) wrote: > Actually Gabor, using your solution with 'atop', which I had not > considered, it will work with ba

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
Actually Gabor, using your solution with 'atop', which I had not considered, it will work with base graphics: par(oma = c(0, 0, 2, 0), mar = c(5, 6, 0.25, 2), lheight = 1) plot(1:10, ylab = expression(atop(" "^14*C*"-glyphosate line1", line2))) HTH, Marc On

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Gabor Grothendieck
Sorry, you wanted a ylab=, not a main=. Try using xyplot in lattice: library(lattice) xyplot(1~1, ylab = expression(atop(phantom(0)^14*C*"-glyphosate line", "line2"))) On 8/4/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Use atop: > > plot(1, main = expression(atop(" "^14*C*"-glyphosate

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Gabor Grothendieck
Use atop: plot(1, main = expression(atop(" "^14*C*"-glyphosate line", "line2"))) On 8/4/06, Andrew Kniss <[EMAIL PROTECTED]> wrote: > I've tried several different ways to accomplish this, but as yet to no > avail. My y-axis for a plot has a rather long label, and thus I have > been using "/n"

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: > I've tried several different ways to accomplish this, but as yet to no > avail. My y-axis for a plot has a rather long label, and thus I have > been using "/n" to break it into two lines. However, to make it > technically correct for public

[R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Andrew Kniss
I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using "/n" to break it into two lines. However, to make it technically correct for publication, I also need to use superscript in the label. For exampl

Re: [R] execute R expression from command line

2005-09-08 Thread Seth Falcon
On 8 Sep 2005, [EMAIL PROTECTED] wrote: > Can I execute an R expression from the command line without having > it in an infile, something like perl's -e flag. So it would look > like: > > R {Rexpression;} > outfile With a bash-like shell, you can do: echo "li

[R] execute R expression from command line

2005-09-08 Thread Omar Lakkis
Can I execute an R expression from the command line without having it in an infile, something like perl's -e flag. So it would look like: R {Rexpression;} > outfile __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] R: expression

2005-07-19 Thread Thomas Lumley
On Tue, 19 Jul 2005, Uwe Ligges wrote: > Clark Allan wrote: > >> hi all >> i am having a problem with the expression/paste command >> say we estimate a variable, named PHI >> it contains the value of say 2 >> and we want to display this value as " hat(phi) = PHI" onto a graphic >> i.e. " hat(phi)

Re: [R] R: expression

2005-07-19 Thread Adaikalavan Ramasamy
Something like this : x <- 0.5 plot( 1:10, main=substitute( hat(Phi) ~ "=" ~ x, list(x=x) ) ) Also see http://tolstoy.newcastle.edu.au/R/help/04/09/3371.html Regards, Adai On Tue, 2005-07-19 at 13:35 +0200, Clark Allan wrote: > hi all > > i am having a problem with the expression/paste com

Re: [R] R: expression

2005-07-19 Thread Uwe Ligges
Clark Allan wrote: > hi all > > i am having a problem with the expression/paste command > > say we estimate a variable, named PHI > > it contains the value of say 2 > > and we want to display this value as " hat(phi) = PHI" onto a graphic > > i.e. " hat(phi)=2 " > > how does one do this? >

[R] R: expression

2005-07-19 Thread Clark Allan
hi all i am having a problem with the expression/paste command say we estimate a variable, named PHI it contains the value of say 2 and we want to display this value as " hat(phi) = PHI" onto a graphic i.e. " hat(phi)=2 " how does one do this? i've tried the following: 1. legend(-5

Re: [R] Expression in panel.text

2005-04-22 Thread Deepayan Sarkar
On Friday 22 April 2005 10:12, David Orme wrote: > Hi, > > I've got a lattice xyplot and I want to superimpose correlation > coefficients and p values on each panel. I've been trying to get this > to work using something of the form: > > x <- rnorm(400) > y <- rnorm(400) > a <- gl(4, 100) > > xyplo

[R] Expression in panel.text

2005-04-22 Thread David Orme
Hi, I've got a lattice xyplot and I want to superimpose correlation coefficients and p values on each panel. I've been trying to get this to work using something of the form: x <- rnorm(400) y <- rnorm(400) a <- gl(4, 100) xyplot(y~x | a, panel=function(x,y, ...){

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

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

2004-07-29 Thread Spencer Graves
I don't know latex, but have you looked at "?plotmath", including 'demo(plotmath)', the examples in the documentation, and an R site search suggested in the posting guide (http://www.R-project.org/posting-guide.html)? What you want is probably fairly easy, once you parse the "plotmath" do

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

2004-07-29 Thread ivo_welch-rstat8783
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 } I cannot figure out how to do this. I know I have to use a function that uses expression

Re: [R] expression with running index

2004-04-25 Thread Prof Brian Ripley
lapply(-1:2, function(i) substitute(expression(b[i]), list(i=i))) would be a good start. (Note that what it gives is [[1]] expression(b[as.integer(-1)]) which is not what you asked for but is what I think you intended. Then we can elaborate this to f <- function(ind, vec) lapply(ind,

Re: [R] expression with running index

2004-04-25 Thread Uwe Ligges
Tamas Papp wrote: Hi, I need a list of expression of the form expression(b[i]), where i is a running index. So for example, if i <- -1:2, I would like to have a list equivalent to list(expression(b[-1]), expression(b[0]), expression(b[1]), expression(b[2])) "i" might be a character vector (like

[R] expression with running index

2004-04-25 Thread Tamas Papp
Hi, I need a list of expression of the form expression(b[i]), where i is a running index. So for example, if i <- -1:2, I would like to have a list equivalent to list(expression(b[-1]), expression(b[0]), expression(b[1]), expression(b[2])) "i" might be a character vector (like c("f", "g", "h"))

[R] expression for simple EM

2003-02-23 Thread Vumani Dlamini
Dear R users, I know this is the wrong forum for such a question but I need help. I would like to write down the likelihood expression for a simple EM problem. I have one categorical covariate with 5 levels and a missing count which can fall in any of the categories. I know the solution to the