[R] creating expression with for-loop

From: Thomas Hoffmann <hoffmann_at_giub.uni-bonn.de>
Date: Wed, 09 Apr 2008 21:22:22 +0200

Dear listmembers

I would like to create an expression that looks like

labl = expression(10^1,10^2,10^3,10^4,10^5)

using a for-loop. However

for (i in 1:5){ labl[i]=expression(10^i) }

does not do the right thing. Does anybody knows help?


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. Received on Wed 09 Apr 2008 - 19:26:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Apr 2008 - 20:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive