Also take a look at sprintf, which offers everything the C-equivalent
has. sprintf returns a string which can be sent to the console via cat.
Andreas
baptiste auguie schrieb:
Hi,
Try this,
cat(format("The TITLE", width=80, justify="centre"))
HTH,
baptiste
On 5 May 2011 19:28, Dan Abner <dan.abne...@gmail.com> wrote:
Hello everyone,
I have a few questions about the print() fn:
1) I have the following code that does not center the character string:
print("The TITLE",quote=FALSE,justify="center")
2) How can I get R to not print the leading [1], etc. when using print()?
(Sorry, I don't know what the leading [1] is called. I tried looking it up
in "An Introduction", but could not find it).
Any help is greatly appreciated!
Dan
[[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.
______________________________________________
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.
--
Andreas Borg
Medizinische Informatik
UNIVERSITÄTSMEDIZIN
der Johannes Gutenberg-Universität
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Obere Zahlbacher Straße 69, 55131 Mainz
www.imbei.uni-mainz.de
Telefon +49 (0) 6131 175062
E-Mail: b...@imbei.uni-mainz.de
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den
Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe
dieser Mail und der darin enthaltenen Informationen ist nicht gestattet.
______________________________________________
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.