[R] plotmath: how to use greek symbols in expression(integral(f(tau)*dtau, 0, t))?

2010-10-04 Thread Czerminski, Ryszard
I would like to use greek tau as a symbol of variable to integrate
over in plotmath

expression(integral(f(tau)*dtau, 0,t))

but nothing seems to work. I tried d{\tau}, d\tau, etc.,
without any success

Is it possible? How can I accomplish this?

Best regards,
Ryszard


--
Confidentiality Notice: This message is private and may ...{{dropped:11}}

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotmath: how to use greek symbols in expression(integral(f(tau)*dtau, 0, t))?

2010-10-04 Thread peter dalgaard

On Oct 4, 2010, at 15:25 , Czerminski, Ryszard wrote:

 I would like to use greek tau as a symbol of variable to integrate
 over in plotmath
 
 expression(integral(f(tau)*dtau, 0,t))
 
 but nothing seems to work. I tried d{\tau}, d\tau, etc.,
 without any success
 
 Is it possible? How can I accomplish this?

I'd try
...f(tau)~d*tau...



 
 Best regards,
 Ryszard
 
 
 --
 Confidentiality Notice: This message is private and may ...{{dropped:11}}
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotmath: how to use greek symbols in expression(integral(f(tau)*dtau, 0, t))?

2010-10-04 Thread Thomas Stewart
Try

expression(paste(integral(),f(,tau,) d,tau,sep=)))

it works for me.

-tgs

On Mon, Oct 4, 2010 at 9:25 AM, Czerminski, Ryszard 
ryszard.czermin...@astrazeneca.com wrote:

 I would like to use greek tau as a symbol of variable to integrate
 over in plotmath

 expression(integral(f(tau)*dtau, 0,t))

 but nothing seems to work. I tried d{\tau}, d\tau, etc.,
 without any success

 Is it possible? How can I accomplish this?

 Best regards,
 Ryszard


 --
 Confidentiality Notice: This message is private and may ...{{dropped:11}}

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotmath: how to use greek symbols in expression(integral(f(tau)*dtau, 0, t))?

2010-10-04 Thread David Winsemius


On Oct 4, 2010, at 10:11 AM, Thomas Stewart wrote:


Try

expression(paste(integral(),f(,tau,) d,tau,sep=)))

it works for me.


It does work (albeit without properly including the requested limits  
of integrations), but if it is used as a teaching example, it will  
obscure the syntax of plotmath expressions. A simple version that gets  
the same result is:


 expression(integral()*f(tau)*d*tau))

Plotmath expressions are parsed from unquoted text with proper non- 
printing separators being ~ for space and * for juxtaposition. The  
plotmath paste() is not really the same as the base function paste(),  
despite identical names and its main value is as a method for allowing  
commas to also be used as separators. Frankly I'm a bit surprised you  
got away with adding the undocumented sep= argument. My reading of  
the help page for plotmath would have lead me to predict that the text  
'sep=' should appear in the output. Instead the sep= is ignored  
and the text string is appended to the end of the expression


Try for instance:

plot(1,1, main=expression(paste(a,b,c,d, sep=-) )  )

--
David.



-tgs

On Mon, Oct 4, 2010 at 9:25 AM, Czerminski, Ryszard 
ryszard.czermin...@astrazeneca.com wrote:


I would like to use greek tau as a symbol of variable to integrate
over in plotmath

expression(integral(f(tau)*dtau, 0,t))

but nothing seems to work. I tried d{\tau}, d\tau, etc.,
without any success

Is it possible? How can I accomplish this?

Best regards,
Ryszard


--
Confidentiality Notice: This message is private and may ... 
{{dropped:11}}


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.