All,
The first use of expression produces a double subscript while the second does
not.
I searched in ?plotmath and the archives and didn't find anything. I'm
sure I'm missing
something obvious but can't seem to find. any suggestions much appreciated.
Cheers,
David
plot(1:10, 1:10)
text(par("usr")[1] - .5, 5, adj = 1, labels = expression(hat(b)[11]),
xpd = TRUE)
text(par("usr")[1] - .5, 5, adj = 1, labels = expression(hat(b)[0i]),
xpd = TRUE)
Not sure what you mean by "double subscript." "11" is the
number eleven and
that is what is shown, as expected.
0i is the complex number 0+0i (type it at your console), and that is what is
shown.
Does that solve the mystery? Maybe try it with 11i as the subscript to help
you see it.
-- Bert Gunter
Genentech
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
Behalf Of Afshartous, David
Sent: Friday, May 23, 2008 2:43 PM
To: r-help at r-project.org
Subject: [R] exrpression(), double subscript
All,
The first use of expression produces a double subscript while the second
does not.
I searched in ?plotmath and the archives and didn't find anything. I'm
sure
I'm missing
something obvious but can't seem to find. any suggestions much appreciated.
Cheers,
David
plot(1:10, 1:10)
text(par("usr")[1] - .5, 5, adj = 1, labels = expression(hat(b)[11]),
xpd TRUE)
text(par("usr")[1] - .5, 5, adj = 1, labels = expression(hat(b)[0i]),
xpd TRUE)
Afshartous, David wrote:> All, > > The first use of expression produces a double subscript while the second does not. > I searched in ?plotmath and the archives and didn't find anything. I'm sure I'm missing > something obvious but can't seem to find. any suggestions much appreciated. > > Cheers, > David > > > plot(1:10, 1:10) > text(par("usr")[1] - .5, 5, adj = 1, labels = expression(hat(b)[11]), xpd = TRUE) > text(par("usr")[1] - .5, 5, adj = 1, labels = expression(hat(b)[0*i]), xpd = TRUE)If you want "0i" as subscript, use expression(hat(b)[0*i]) (0i is complex and represented by 0+0i afterwards) Or does "double" mean you want i as subscript of 0? Then just try expression(hat(b)[0[i]]) Uwe Ligges> > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at 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.