[R] how to use paste in function for expression?
Dieter Menne
dieter.menne at menne-biomed.de
Sat Dec 18 18:14:24 CET 2010
casperyc wrote:
>
> ... Expression in lattice .... example
>
> hist(Q5[,i],main=expression(paste("t[",dof2,"]",sep="")))does not work
>
dof=c(1,2,4,8,16,32)
Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
par(mfcol=c(2,6))
for (i in 1:6){
dof2=dof[i]
hist(Q5[,i],main=bquote(t[.(dof2)]))
qqnorm(Q5[,i])
qqline(Q5[,i])
}
See
http://r-project.markmail.org/thread/ui3vztyvafyar76f
--
View this message in context: http://r.789695.n4.nabble.com/how-to-use-paste-in-function-for-expression-tp3093822p3093835.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list