[R] R-graphics printing greeks

Dan Avery DAvery at marketingleverage.com
Thu Oct 18 15:48:39 CEST 2007


I have tried to print a table of greek alphabet names and symbols
without success. I can print one character at a time but can't seem to
find a way to automate an entire list of the symbols. Some of the code I
have tried is below. I have searched on help, worked the examples in the
December 2002 R Help Desk article and plotmath but have  not been able
to find a way to accomplish the automation. There must be a way.
 
Any help would be greatly appreciated.
 
Thanks
 
Dan Avery
 
 order<-seq(2,6.5,.5)
 greeks<-c( "alpha","beta","gamma","delta","epsilon", "zeta", "eta",
"theta","iota" ,"kappa",  "lambda" , "mu",
"nu","xi","o","pi","rho","sigma","tau","upsilon","phi",chi", "psi" ,
"omega" )
 plot(1:10,1:10,type="n")

 text(2,8,expression(alpha)) #this works
     
for (i in 1:10) text(2,order[i],greeks[i])# produces a list of the first
10 names not the symbols
 
for (i in 1:10) text(5,order[i],substitute(eval(greeks[i]))) #produces
10 instances of eval(greeks1)

for (i in 1:10) text(7,order[i],substitute(greeks[i]))# produces 10
instances of greeks1



More information about the R-help mailing list