Re: [R] expression in lattice panel strip

2025-03-03 Thread Naresh Gurbuxani
Thanks all for your responses. My problem is solved. Sent from my iPhone On Mar 3, 2025, at 1:08 AM, Deepayan Sarkar wrote:  This is possible but a little cumbersome. Bert is on the right track with strip.custom: xyplot(ts(cbind(x1 = cs, x2 = cs + w)), strip = strip.custom(factor.lev

Re: [R] expression in lattice panel strip

2025-03-02 Thread Deepayan Sarkar
This is possible but a little cumbersome. Bert is on the right track with strip.custom: xyplot(ts(cbind(x1 = cs, x2 = cs + w)), strip = strip.custom(factor.levels = expression(2 * cos(2 * pi * t / 50 + 0.6 * pi), 2 *

Re: [R] expression in lattice panel strip

2025-03-02 Thread Bert Gunter
Full disclosure: I have never plotted time series using this xyplot method. However, ?xyplot.ts says: "screens factor (or coerced to factor) whose levels specify which panel each series is to be plotted in. screens = c(1, 2, 1) would plot series 1, 2 and 3 in panels 1, 2 and 1. May also be a nam

[R] expression in lattice panel strip

2025-03-02 Thread Naresh Gurbuxani
Is it possible to include expression in lattice panel strip? Thanks, Naresh cs <- 2 * cos(2 * pi * (1:500) / 50 + 0.6 * pi) w <- rnorm(500) xyplot(ts(cbind(x1 = cs, x2 = cs + w)), screens = list(x1 = expression(2 * cos(2 * pi * t / 50 + 0.6 * pi)), x2 = expression(2 * cos(2 * pi * t / 50 + 0.6 *

Re: [R] Extract function parameters from a R expression

2018-06-20 Thread Gabor Grothendieck
If you specifically want to know which packages were loaded by the script then using a vanilla version of R (i.e. one where only base packages are loaded): vanilla_search <- search() source("myRprg.R") setdiff(search(), vanilla_search) On Wed, Jun 20, 2018 at 4:08 AM, Sigbert Klinke wrot

Re: [R] Extract function parameters from a R expression

2018-06-20 Thread Bert Gunter
... or if the argument is just quoted text or a numeric value as in your library() example, don't parse the text and use regex's to search for the function call and pick out the text of the arguments. Again, this only works (I think) for the simple sort of case of your example. Beyond that, you'll

Re: [R] Extract function parameters from a R expression

2018-06-20 Thread Hadley Wickham
You need to recursively walk the parse tree/AST. See, e.g., https://adv-r.hadley.nz/expressions.html#ast-funs Hadley On Wed, Jun 20, 2018 at 10:08 AM, Sigbert Klinke wrote: > Hi, > > I have read an R program with > > expr <- parse("myRprg.R") > > How can I extract the parameters of a specifc R c

[R] Extract function parameters from a R expression

2018-06-20 Thread Sigbert Klinke
Hi, I have read an R program with expr <- parse("myRprg.R") How can I extract the parameters of a specifc R command, e.g. "library"? So, if myprg.R containes the lines library("xyz") library("abc") then I would like to get "xyz" and "abc" back from expr. Thanks in advance Sigbert -- https

Re: [R] expression input to a function

2016-05-04 Thread Duncan Murdoch
On 04/05/2016 7:11 AM, Naresh Gurbuxani wrote: I am trying to write a function, which can be made very general if one of the inputs can be an expression. How can this be done? For example, to find root of a function, I would like to say my.func <- function(x) {x^3 + 2 * (x^2) - 7} x.left <-

Re: [R] expression evaluation during recursion

2015-10-22 Thread david . kaethner
> You seem to have ignored my explanation. True, sorry. Thanks for sticking with me. Making sense now. > > Duncan Murdoch > >> >> >>> Am 22.10.2015 um 19:05 schrieb Duncan Murdoch >> >: >>> >>> On 22/10/2015 10:20 AM,david.kaeth...@gmail.com >>>

Re: [R] expression evaluation during recursion

2015-10-22 Thread Duncan Murdoch
On 22/10/2015 2:44 PM, david.kaeth...@gmail.com wrote: Hi, I’m sure there’s a ton I don’t understand about environments, but I’m afraid your answer doesn’t make sense to me. If it’s on the search path, the „print(env)“ should yield something like: You never get to the search list. attr(,

Re: [R] expression evaluation during recursion

2015-10-22 Thread david . kaethner
Hi, I’m sure there’s a ton I don’t understand about environments, but I’m afraid your answer doesn’t make sense to me. If it’s on the search path, the „print(env)“ should yield something like: attr(,"name") [1] "package:pryr" attr(,"path") [1] "/Library/Frameworks/R.framework/Versions/3.2/Res

Re: [R] expression evaluation during recursion

2015-10-22 Thread Duncan Murdoch
On 22/10/2015 10:20 AM, david.kaeth...@gmail.com wrote: > Hello, > > I’m trying to solve an exercise, where I want to walk through the search path > recursively (http://adv-r.had.co.nz/Environments.html > ). > > I’m puzzled by a certain behavior and ho

[R] expression evaluation during recursion

2015-10-22 Thread david . kaethner
Hello, I’m trying to solve an exercise, where I want to walk through the search path recursively (http://adv-r.had.co.nz/Environments.html ). I’m puzzled by a certain behavior and hope somebody can give me an explanation. This code works: listenv <-

Re: [R] expression in xlab for a plot

2014-01-01 Thread arun
HI, Another way would be to use ?substitute() hist(runif(1000,0,100),xlab=substitute(expression(AUC[low - high]~ (xyz)),list(low=low,high=high)),ylab="Frequency") A.K. On Wednesday, January 1, 2014 10:36 AM, arun wrote: Hi,May be this helps:   hist(runif(1000,0,100),xlab=bquote(AUC[.(low) -

Re: [R] expression in xlab for a plot

2014-01-01 Thread arun
Hi,May be this helps:   hist(runif(1000,0,100),xlab=bquote(AUC[.(low) - .(high)]~ (xyz)),ylab="Frequency") A.K. On Wednesday, January 1, 2014 10:30 AM, Andras Farkas wrote: Dear All, Happy new year! wonder if you could help with the following: we have: hist(runif(1000,0,100),xlab=express

[R] expression in xlab for a plot

2014-01-01 Thread Andras Farkas
Dear All, Happy new year! wonder if you could help with the following: we have: hist(runif(1000,0,100),xlab=expression(AUC[0 - 24]~ (xyz)),ylab="Frequency") the plan is to have part of the xlab expression change dynamically, specifically the values of 0 and 24 should be able to update 'autom

Re: [R] Expression evaluation of Plotting labels containing spaces

2013-06-04 Thread Pascal Oettli
Hello, ?plotmath -> See Also demo(plotmath) Regards, Pascal On 05/06/13 15:00, Santosh wrote: Thanks so much!! Would be it be better if in vignette of plotmath, x %~% y and x~~y; likewise, other operations (.e.g., x %*% y, x * y) may be grouped, so that are not missed by a layman like me! -

Re: [R] Expression evaluation of Plotting labels containing spaces

2013-06-04 Thread Santosh
Thanks so much!! Would be it be better if in vignette of plotmath, x %~% y and x~~y; likewise, other operations (.e.g., x %*% y, x * y) may be grouped, so that are not missed by a layman like me! - just a thought... Thanks, Santosh On Tue, Jun 4, 2013 at 9:13 PM, David Winsemius wrote: > > O

Re: [R] Expression evaluation of Plotting labels containing spaces

2013-06-04 Thread David Winsemius
On Jun 4, 2013, at 8:39 PM, Santosh wrote: Dear Rxperts, How do I overcome the anomaly as in the second case of examples below? exc <- list(units=list( c(m^2)) ,vars= list(c('asb')), ,label= list(c('abs surf body'))) plot(1:10,1:10, ylab=parse(text= paste(exc$vars[1],' (',exc$units[1],')',

Re: [R] Expression evaluation of Plotting labels containing spaces

2013-06-04 Thread Pascal Oettli
Hi, On possibility is: par(mfrow=c(2,1), mar=c(5.1,5.1,4.1,2.1)) plot(1,1, ylab=expression(a.s.b.~(m^2))) plot(1,1, ylab=expression(abs~surf~body~(m^2))) Regards, Pascal On 05/06/13 11:39, Santosh wrote: Dear Rxperts, How do I overcome the anomaly as in the second case of examples below? exc

Re: [R] Expression evaluation of Plotting labels containing spaces

2013-06-04 Thread Pascal Oettli
Hello, Example not reproducible: > exc <- list(units=list( c(m^2)) ,vars= list(c('asb')), ,label= list(c('abs surf body'))) Error: object 'm' not found Regards, Pascal On 05/06/13 11:39, Santosh wrote: Dear Rxperts, How do I overcome the anomaly as in the second case of examples below? e

[R] Expression evaluation of Plotting labels containing spaces

2013-06-04 Thread Santosh
Dear Rxperts, How do I overcome the anomaly as in the second case of examples below? exc <- list(units=list( c(m^2)) ,vars= list(c('asb')), ,label= list(c('abs surf body'))) plot(1:10,1:10, ylab=parse(text= paste(exc$vars[1],' (',exc$units[1],')',sep=''))) plot(1:10,1:10, ylab=parse(text= paste(

Re: [R] expression

2013-04-01 Thread Peter Ehlers
On 2013-04-01 12:46, Jose Narillos de Santos wrote: Hi all, I´m using titt<- expression(paste("R con ventanas de 200 ", italic(datos))) And it works properly on a plot(...,main=titt,..) But if I want to add an improvement to avoid typing n on the plot so that n<-200 titt<- expression(paste

Re: [R] expression

2013-04-01 Thread William Dunlap
-project.org] On > Behalf > Of Jose Narillos de Santos > Sent: Monday, April 01, 2013 12:46 PM > To: r-help > Subject: [R] expression > > Hi all, > > I´m using > > > titt<- expression(paste("R con ventanas de 200 ", italic(datos))) > > And i

Re: [R] expression

2013-04-01 Thread Bert Gunter
?plotmath tells you how. -- Bert On Mon, Apr 1, 2013 at 12:46 PM, Jose Narillos de Santos wrote: > Hi all, > > I惴 using > > > titt<- expression(paste("R con ventanas de 200 ", italic(datos))) > > And it works properly on a plot(...,main=titt,..) > > But if I want to add an improvement to avoid

[R] expression

2013-04-01 Thread Jose Narillos de Santos
Hi all, I´m using titt<- expression(paste("R con ventanas de 200 ", italic(datos))) And it works properly on a plot(...,main=titt,..) But if I want to add an improvement to avoid typing n on the plot so that n<-200 titt<- expression(paste("R con ventanas de ",n, italic(datos))) It doesn´t

Re: [R] expression exponent labeling

2013-03-13 Thread Peter Ehlers
On 2013-03-13 06:37, Gerrit Eichner wrote: Hi, Berry, I think for(i in -8:-3) axis(1, i, substitute(10^j, list( j = i))) achieves what you want. Regards -- Gerrit Here's another (really no different) solution: for(i in -8:-3) axis(1, i, bquote(10^.(i))) For more flexibility, if you

Re: [R] expression exponent labeling

2013-03-13 Thread Gerrit Eichner
Hi, Berry, I think for(i in -8:-3) axis(1, i, substitute(10^j, list( j = i))) achieves what you want. Regards -- Gerrit On Wed, 13 Mar 2013, Berry Boessenkool wrote: Hi all, I want to label an axis with exponents, but can't get it done with expression. Any hints would be very welcom

[R] expression exponent labeling

2013-03-13 Thread Berry Boessenkool
Hi all, I want to label an axis with exponents, but can't get it done with expression. Any hints would be very welcome! # simulated data, somewhat similarly distributed to my real data: set.seed(12); d <- rbeta(1e6, 0.2,2)*150 ; d <- d[d>1e-8] hist( d  , breaks=100) # now on a logarithmically s

Re: [R] Expression in legend of plot

2012-10-25 Thread stat.kk
So easy solution..., thank you very much :) -- View this message in context: http://r.789695.n4.nabble.com/Expression-in-legend-of-plot-tp4647393p4647397.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing li

Re: [R] Expression in legend of plot

2012-10-25 Thread Bert Gunter
... and note that the "{" ,"}" are unnecessary: > plot(1, main = bquote(f^-1*(x))) -- Bert On Thu, Oct 25, 2012 at 4:32 AM, Rui Barradas wrote: > Hello, > > Use an asterisk to put a space between the exponent an (x). > > plot(1, main = expression(f^{-1}*(x))) > > Hope this helps, > > Rui Barr

Re: [R] Expression in legend of plot

2012-10-25 Thread Rui Barradas
Hello, Use an asterisk to put a space between the exponent an (x). plot(1, main = expression(f^{-1}*(x))) Hope this helps, Rui Barradas Em 25-10-2012 12:21, stat.kk escreveu: I would like to have an expression f^(-1)(x) in a legend of plot. For this I used expression(f^{-1}(x)), but variabl

[R] Expression in legend of plot

2012-10-25 Thread stat.kk
I would like to have an expression f^(-1)(x) in a legend of plot. For this I used expression(f^{-1}(x)), but variable is always in exponent. How could I change it in order to (x) be in a line, not in exponent? Thank you for your responses! -- View this message in context: http://r.789695.n4.na

Re: [R] expression() and font.lab ?

2012-04-27 Thread Hermes
Thank you David. Regards, Aparna On 27 Apr 2012, at 22:44, David Winsemius wrote: > converted formated text to plain text. > On Apr 27, 2012, at 3:52 PM, Aparna Radhakrishnan wrote: > >> Hi...sorry that my question seemed incomplete. >> >> The plotting code : >> par >> (cex >> .axis >> = >>

Re: [R] expression() and font.lab ?

2012-04-27 Thread David Winsemius
converted formated text to plain text. On Apr 27, 2012, at 3:52 PM, Aparna Radhakrishnan wrote: Hi...sorry that my question seemed incomplete. The plotting code : par (cex .axis = 0.8,las=1,font.lab=2,font.axis=2,family="sans",mgp=c(2,1,0),mar=c(3, 3, 4, 2)+0.1) plot(A$pos,-log(A$GPVI_frequen

Re: [R] expression() and font.lab ?

2012-04-27 Thread Aparna Radhakrishnan
Hi...sorry that my question seemed incomplete. The plotting code : par(cex.axis=0.8,las=1,font.lab=2,font.axis=2,family="sans",mgp=c(2,1,0),mar=c(3, 3, 4, 2)+0.1) plot(A$pos,-log(A$GPVI_frequentist_add_Batch_expected_pvalue,10),col=A$R2class,pch=A$pch,xlim=c(161160087,161214038),ylim=c(0,7),xlab=

Re: [R] expression() and font.lab ?

2012-04-27 Thread David Winsemius
On Apr 27, 2012, at 11:22 AM, aparna15 wrote: Hi.. I managed to use expression() for superscripting and subscripting values in my axis labels. What's missing here is your plotting code and your machine and R installation details. You may want to review the Posting Guide for what is re

[R] expression() and font.lab ?

2012-04-27 Thread aparna15
Hi.. I managed to use expression() for superscripting and subscripting values in my axis labels. However, I notice that the font and style that I had passed through par() are ignored. I used : par(font.lab=2, font=2, family="sans") but when I employ expression() for my xlab, the styling given a

Re: [R] expression set (Bioconductor) problem

2011-10-09 Thread Juliet Hannah
Note that exprs returns a matrix, so we can manipulate that just as we would for any other type of matrix. There is also a Bioconductor mailing list, which may be helpful. On Thu, Oct 6, 2011 at 4:56 AM, Clayton K Collings wrote: > Hello R people, > >>dim(exprs(estrogenrma) > > I have an expressi

[R] expression set (Bioconductor) problem

2011-10-06 Thread Clayton K Collings
Hello R people, >dim(exprs(estrogenrma) I have an expressionSet with 8 samples and 12695 features (genes) > estrogenrma$estrogen present present absent absent present present absent absent > estrogenrma$time.h 10 10 10 10 48 48 48 48 present <- grep("present", as.character(estrogenrma$estr

Re: [R] Expression: +/-sigma

2011-07-27 Thread David Winsemius
On Jul 27, 2011, at 8:57 AM, ogbos okike wrote: Dear List, I am trying to label a plot with the symbol +/- sigma. Using something like - expression (2*sigma) gives me the symbol 2ó. However, adding +/- to it beats me. The code I am using is: plot(x,y,type="l",main=" expression(paste("±"

Re: [R] Expression: +/-sigma

2011-07-27 Thread Yves REECHT
Hi, You may try something like: plot(rnorm(10), rnorm(10), main=expression("" %+-% 2*sigma)) HTH, Yves Le 27/07/2011 14:57, ogbos okike a écrit : > Dear List, > I am trying to label a plot with the symbol +/- sigma. Using something like > - expression (2*sigma) gives me the symbol 2ó. How

[R] Expression: +/-sigma

2011-07-27 Thread ogbos okike
Dear List, I am trying to label a plot with the symbol +/- sigma. Using something like - expression (2*sigma) gives me the symbol 2ó. However, adding +/- to it beats me. The code I am using is: plot(x,y,type="l",main=" expression(paste("±", plain(2*ó)),sep=""). Any suggestion will be appreciated.

Re: [R] expression() and axis labels

2011-07-16 Thread Uwe Ligges
On 16.07.2011 20:01, Thomthom wrote: Thanks everyone! This is exactly what I needed! My graphs look perfect now thanks to you guys! :) Thanks so much! I've spent hours on this... Last question though: do I need to edit my post and signal it as a "solved" topic (I saw that on other forums...

Re: [R] expression() and axis labels

2011-07-16 Thread Thomthom
Thanks everyone! This is exactly what I needed! My graphs look perfect now thanks to you guys! :) Thanks so much! I've spent hours on this... Last question though: do I need to edit my post and signal it as a "solved" topic (I saw that on other forums... and I have to admit I am not really famil

Re: [R] expression() and axis labels

2011-07-16 Thread Uwe Ligges
On 16.07.2011 19:10, David Winsemius wrote: On Jul 16, 2011, at 12:09 PM, Thomthom wrote: Hi everyone! I tried to look up in the previous topics whether there was something similar to my question but I think there's nothing corresponding... Anyway! Here is my problem: I have a plot (qplot

Re: [R] expression() and axis labels

2011-07-16 Thread Joshua Wiley
On Sat, Jul 16, 2011 at 10:10 AM, David Winsemius wrote: > > On Jul 16, 2011, at 12:09 PM, Thomthom wrote: > >> Hi everyone! >> >> I tried to look up in the previous topics whether there was something >> similar to my question but I think there's nothing corresponding... >> >> Anyway! Here is my p

Re: [R] expression() and axis labels

2011-07-16 Thread David Winsemius
On Jul 16, 2011, at 12:09 PM, Thomthom wrote: Hi everyone! I tried to look up in the previous topics whether there was something similar to my question but I think there's nothing corresponding... Anyway! Here is my problem: I have a plot (qplot()) in which I want to insert axis labels with

[R] expression() and axis labels

2011-07-16 Thread Thomthom
Hi everyone! I tried to look up in the previous topics whether there was something similar to my question but I think there's nothing corresponding... Anyway! Here is my problem: I have a plot (qplot()) in which I want to insert axis labels with the following text: kg NH4+ N-equiv. * ha-1 yr-1

[R] expression at labels in contour function

2011-03-10 Thread Rogerio Porto
Hello, I'm stuck with the following code. p <- 0:100/100 a <- 0:200/100 beta <- matrix(a + p%x%(1-a), nrow=length(a), ncol=length(p)) lb <- c(expression(beta==0), expression(beta==0.2), expression(beta==0.4), expression(beta==0.6), expression(beta==0.8), expression(beta==1), expression(beta==1.2)

Re: [R] expression help

2011-03-01 Thread Dennis Murphy
Hi: 1. expression() in plotmath ignores control characters such as \n. 2. The workaround, discussed a couple of times on this list (hence in the archives), is to use the atop function, so try something like plot(0:1,0:1,xaxt="n") axis(side=1,at=.3,expression(paste("IFN-", gamma, "\n", "TNF-", alp

[R] expression help

2011-03-01 Thread Daryl Morris
Hello, I am trying to write math-type on a plot. Due to space limitations on the plot, I want 2 short expressions written on top of each other. It is certainly possible to write them in two separate calls, but that involves fine-tuning locations and a lot of trial and error (and I'm trying

Re: [R] expression for index of pairwise combinations

2011-02-09 Thread Pete Brecknock
If I have understood correctly, then as an example for 4 columns how about d=data.frame(C1=c(1,1,1,1,1),C2=c(2,2,2,2,2),C3=c(3,3,3,3,3),C4=c(4,4,4,4,4)) combs=combn(paste("C",seq_len(4),sep=""),2,simplify=FALSE) one = sapply(combs,function(x) d[x[1]]) two = sapply(combs,function(x) d[x[2

Re: [R] expression() problem !

2010-10-11 Thread David Winsemius
On Oct 11, 2010, at 7:27 PM, michel.mas wrote: Hello everyone ... I have a problem when I try to mix expressions using the function expression () with variables coming from my code. Has anyone faced such a problem? Many times: ?bquote # instead of expression -- View this message i

[R] expression() problem !

2010-10-11 Thread michel.mas
Hello everyone ... I have a problem when I try to mix expressions using the function expression () with variables coming from my code. Has anyone faced such a problem? -- View this message in context: http://r.789695.n4.nabble.com/expression-problem-tp2990891p2990891.html Sent from the R help ma

Re: [R] expression() and plot title

2010-08-28 Thread David Winsemius
On Aug 28, 2010, at 4:48 PM, Sancar Adali wrote: My function is like this sim.res<-gaussian_simulation(p=3, r=4, q=3, c=0.1,d=2, Wchoice = "avg", pre.scaling = TRUE, oos = TRUE, alpha = NULL, n = 100, m = 100, nmc = 100) which is defined as gaussian_simulation <- function(p,

Re: [R] expression() and plot title

2010-08-28 Thread Sancar Adali
My function is like this sim.res<-gaussian_simulation(p=3, r=4, q=3, c=0.1,d=2, Wchoice = "avg", pre.scaling = TRUE, oos = TRUE, alpha = NULL, n = 100, m = 100, nmc = 100) which is defined as gaussian_simulation <- function(p, r, q, c, d

Re: [R] expression() and plot title

2010-08-27 Thread Cheng Peng
Try this: > LinePlot(1,1) > LinePlot=function(a,b){ + # a = slope + # b = y intercept + x=seq(-10,10,0.4) + y=a*x+b + plot(x,y, type="l") + title(paste("a=",a,"b=",b)) + } > > #test > LinePlot(a=-2,b=9) HTH -- View this message in context: http://r.789695.n4.nabble.com/expression-and-plot-t

Re: [R] expression() and plot title

2010-08-27 Thread Bill.Venables
:r-help-boun...@r-project.org] On Behalf Of Sancar Adali Sent: Saturday, 28 August 2010 2:54 PM To: r-help Subject: [R] expression() and plot title What I want to do is put the arguments I supply to a function into the title of a plot Say I'm calling func.1 func.1(a=4,b=4) plot(,..., tit

Re: [R] expression() and plot title

2010-08-27 Thread David Winsemius
On Aug 28, 2010, at 12:53 AM, Sancar Adali wrote: What I want to do is put the arguments I supply to a function into the title of a plot Say I'm calling func.1 func.1(a=4,b=4) plot(,..., title("a=4, b=4")) If I'm calling func.1 with different arguments, I want the plot title to refl

[R] expression() and plot title

2010-08-27 Thread Sancar Adali
What I want to do is put the arguments I supply to a function into the title of a plot Say I'm calling func.1 func.1(a=4,b=4) plot(,..., title("a=4, b=4")) If I'm calling func.1 with different arguments, I want the plot title to reflect that. A small detail is that func.1 might have an argumen

Re: [R] expression over-plotted

2010-03-26 Thread Chris Campbell
On Fri, Mar 26, 2010 at 16:05, Brad Eck wrote: > >   When I try to add the following annotation to a plot the entries are plotted >   one on top of the other.  I'm trying to get something that looks like " eta >   =  0.2  "  where the Greek letter is used on the plot.  I realize that >   expressio

[R] expression over-plotted

2010-03-26 Thread Brad Eck
When I try to add the following annotation to a plot the entries are plotted one on top of the other. I'm trying to get something that looks like " eta = 0.2 " where the Greek letter is used on the plot. I realize that expression( eta == 0.2) is one solution, but ultimately I'd li

Re: [R] expression(), mixed symbols and evaluated objects

2010-03-10 Thread Duncan Murdoch
On 10/03/2010 8:52 AM, Markus Loecher wrote: Is it possible to mix symbols and evaluated objects inside the expression() function ? The following example shows what I am trying to achieve: for (m in 1:3) { plot(1:10); #just a place holder for the real plots title(expression(y = m * lambd

[R] expression(), mixed symbols and evaluated objects

2010-03-10 Thread Markus Loecher
Is it possible to mix symbols and evaluated objects inside the expression() function ? The following example shows what I am trying to achieve: for (m in 1:3) { plot(1:10); #just a place holder for the real plots title(expression(y = m * lambda)); } I want to actually evaluate the variabl

Re: [R] expression() help

2010-02-12 Thread Thomas Lumley
On Fri, 12 Feb 2010, Peng Cai wrote: Hi All, I'm trying to use expression() for y-label in plot(). I'm not able to write Average(space)PM(subscript)10. I'm trying: ylab=expression(Average PM[10]) and its not working, because of a space between "Average" and "PM". Thanks, quote("Average PM"[

Re: [R] expression() help

2010-02-12 Thread Henrique Dallazuanna
Try this: expression(Average~PM[10]) On Fri, Feb 12, 2010 at 3:29 PM, Peng Cai wrote: > Hi All, > > I'm trying to use expression() for y-label in plot(). I'm not able to write > Average(space)PM(subscript)10. I'm trying: > > ylab=expression(Average PM[10]) > > and its not working, because of a s

[R] expression() help

2010-02-12 Thread Peng Cai
Hi All, I'm trying to use expression() for y-label in plot(). I'm not able to write Average(space)PM(subscript)10. I'm trying: ylab=expression(Average PM[10]) and its not working, because of a space between "Average" and "PM". Thanks, Peng [[alternative HTML version deleted]] _

Re: [R] expression()

2009-12-20 Thread baptiste auguie
Hi, try this, ylab = expression(Temperature~(degree*F)) ?plotmath baptiste 2009/12/20 Kim Jung Hwa : > Hi All, > > I'm wondering if its possible to write degree in symbol. > > I would like y-label as "Temperature (degreeF)". where degree should be in > symbols. Thanks in advance, > > #R Code >

[R] expression()

2009-12-20 Thread Kim Jung Hwa
Hi All, I'm wondering if its possible to write degree in symbol. I would like y-label as "Temperature (degreeF)". where degree should be in symbols. Thanks in advance, #R Code library(lattice) data(barley) barchart(yield ~ variety | site, data = barley, groups = year, layout = c(1,6),

[R] expression and font type of bold

2009-12-04 Thread Alla Bulashevska
Dear R users, i would like to have expression on my plot written in bold italic font and use following: text(0.01,70,expression(bolditalic(r^2==0.67)),pos= 4) However, only the letter r appears bold and italic, but not the whole expression. How should i change it? Thank you for your help, Alla. _

Re: [R] expression

2009-09-16 Thread baptiste auguie
Try this, marco2 = matrix(rnorm(4), nrow=2, ncol=2) marco3 = 2.12 i =1 plot.new() mtext(bquote(R^2*.(round(marco2[1,i],digits=3))*" N° of proteins:"*.(marco3[i])),side=4,cex=.6) HTH, baptiste 2009/9/16 Marco Chiapello > /Dear all,/// > /I am very thankful, if you could tell what is the righ

[R] expression

2009-09-16 Thread Marco Chiapello
/Dear all,/// /I am very thankful, if you could tell what is the right way to write: mtext(paste(expression("R"^2),round(marco2[1,i],digits=3)," N° of proteins:",marco3[i]),side=4,cex=.6) in this case the output is: "R"^2 I tried also in this way: mtext(paste(expression(paste("R"^2)),round

[R] expression(paste with the superscript in bold font

2009-05-08 Thread Arnaldo Russo
Hi, I`m trying to put my superscript type in bold style. Could somebody help me? My text is inside a barplot. #!/bin/Rbarplot(x, ylab=expression(paste("org.", cm^-2))) # so I tried this way, *barplot(x, ylab=expression(bold(paste("org.", cm^-2* # but my superscript maintain its shape in re

Re: [R] Expression in axis

2008-07-09 Thread S Ellison
>>> Dani Valverde <[EMAIL PROTECTED]> 09/07/2008 10:21:46 >>> >I would like to know how to put this expression to the y axis >µmol/10^6 cells try plot(x,y, ylab=expression(mu*mol^6~cells)) It's in ?plotmath. Steve Ellison *

Re: [R] Expression in axis

2008-07-09 Thread Daniel Malter
Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von Dani Valverde > Gesendet: Wednesday, July 09, 2008 5:22 AM > An: R Help > Betreff: [R] Expression in axis > > Hello, > I am creating a plot and I would like to know how to put this expression &g

Re: [R] Expression in axis

2008-07-09 Thread Gabor Csardi
E.g. > plot(1:10,1:10,xlab=NA) > title(xlab=expression(mu*"mol"/10^6*" cells")) Gabor On Wed, Jul 09, 2008 at 11:21:46AM +0200, Dani Valverde wrote: > Hello, > I am creating a plot and I would like to know how to put this expression > to the y axis >

Re: [R] Expression in axis

2008-07-09 Thread Daniel Malter
e Gesendet: Wednesday, July 09, 2008 5:22 AM An: R Help Betreff: [R] Expression in axis Hello, I am creating a plot and I would like to know how to put this expression to the y axis µmol/10^6 cells I've tried some combinations using the expression(

[R] Expression in axis

2008-07-09 Thread Dani Valverde
Hello, I am creating a plot and I would like to know how to put this expression to the y axis µmol/10^6 cells I've tried some combinations using the expression() function, but none of them worked. Any idea? Best, Dani -- Daniel Valverde Saubí

Re: [R] expression, strsplit, ...

2008-06-26 Thread Bert Gunter
EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of baptiste Auguié Sent: Thursday, June 26, 2008 5:54 AM To: R Help Subject: Re: [R] expression, strsplit, ... OK, thanks to both of you for the clarifications. I guess part of my confusion came from the numerous functions and concepts involv

Re: [R] expression, strsplit, ...

2008-06-26 Thread baptiste Auguié
OK, thanks to both of you for the clarifications. I guess part of my confusion came from the numerous functions and concepts involved in producing such labels: - call vs string vs formula vs expression ... - substitute, bquote, expression, "~", .(), ... I take it as a good thing once you ha

Re: [R] expression, strsplit, ...

2008-06-26 Thread Prof Brian Ripley
On Thu, 26 Jun 2008, baptiste Auguié wrote: On 25 Jun 2008, at 19:45, Gabor Grothendieck wrote: Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 * l^4) Thanks, I would never have expected this code to work, this is a mystery to me! Actually, I thought xlab wanted an expression, but

Re: [R] expression, strsplit, ...

2008-06-26 Thread Gabor Grothendieck
bquote is used like this: alpha <- 5 xlab <- bquote(.(alpha) / V * m^-3 * kg ^-2 * l^4) plot(1, xlab = xlab) On Thu, Jun 26, 2008 at 4:21 AM, baptiste Auguié <[EMAIL PROTECTED]> wrote: > > On 25 Jun 2008, at 19:45, Gabor Grothendieck wrote: > >> Try this: >> >> plot(1, xlab = ~ alpha / V * m^-3

Re: [R] expression, strsplit, ...

2008-06-26 Thread baptiste Auguié
On 25 Jun 2008, at 19:45, Gabor Grothendieck wrote: Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 * l^4) Thanks, I would never have expected this code to work, this is a mystery to me! Actually, I thought xlab wanted an expression, but it seems to be happy with a formula. Also,

Re: [R] expression, strsplit, ...

2008-06-25 Thread Gabor Grothendieck
Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 * l^4) On Wed, Jun 25, 2008 at 1:06 PM, baptiste Auguié <[EMAIL PROTECTED]> wrote: > DeaR list, > > I'm a bit lost in the behavior of substitute and co. > I often use fairly long axis labels in my graphs (long to write, that is). > Typically,

[R] expression, strsplit, ...

2008-06-25 Thread baptiste Auguié
DeaR list, I'm a bit lost in the behavior of substitute and co. I often use fairly long axis labels in my graphs (long to write, that is). Typically, they would contain some greek letters and units with exponents, as in: xlab=expression(paste("text ", alpha, " / ", V,".", m^{-3}, ".", kg

Re: [R] expression matrix

2008-03-10 Thread Jabez Wilson
>Date: Sat, 8 Mar 2008 04:56:58 -0800 (PST) >From: Keizer_71 <[EMAIL PROTECTED]> >Subject: [R] expression matrix >To: r-help@r-project.org >Message-ID: <[EMAIL PROTECTED]> >Content-Type: text/plain; charset=us-ascii >Hello, >I am to run this R script but

Re: [R] expression matrix

2008-03-08 Thread Martin Morgan
Christophe -- You'll want to coerce golubMerge to an ExpressionSet. > library(Biobase) > library(golubEsets) > data(golubMerge) > golubUpdated <- as(golubMerge, "ExpressionSet") Warning messages: 1: In asMethod(object) : missing or mis-shaped 'se.exprs' in original object; creating ExpressionSet

Re: [R] expression matrix

2008-03-08 Thread Douglas Bates
On Sat, Mar 8, 2008 at 7:00 AM, Keizer_71 <[EMAIL PROTECTED]> wrote: > Hello, > I am to run this R script but i keep getting this error. > > expr<-exprs(golubMerge) > Warning message: > The exprSet class is deprecated, use ExpressionSet instead > I tried to find information on the website

[R] expression matrix

2008-03-08 Thread Keizer_71
Hello, I am to run this R script but i keep getting this error. > expr<-exprs(golubMerge) Warning message: The exprSet class is deprecated, use ExpressionSet instead I tried to find information on the website but no luck. (exprSet...etc) thank you. -- View this message in context: http://ww

[R] expression matrix

2008-03-08 Thread Keizer_71
Hello, I am to run this R script but i keep getting this error. > expr<-exprs(golubMerge) Warning message: The exprSet class is deprecated, use ExpressionSet instead I tried to find information on the website but no luck. (exprSet...etc) thank you. -- View this message in context: http://ww