Re: [R] Number of digits in paste funciton

2008-06-18 Thread Prof Brian Ripley
On Wed, 18 Jun 2008, Tine wrote: Hi! Does anyone know hot to set number of digits to be printed in function 'paste'? paste() does not print, so we can only guess at what you mean. The help says 'paste' converts its arguments (_via_ 'as.character') to character strings, and conc

Re: [R] Number of digits in paste funciton

2008-06-18 Thread Peter Dalgaard
Tine wrote: > Hi! > > Does anyone know hot to set number of digits to be printed in function > 'paste'? > Basically, you can't, because as.character always uses 15 digits (chopping trailing zeros). Instead, use round(), format(), formatC(), etc. Or sprintf() > paste(format(pi,digits=4),format(exp

Re: [R] Number of digits in paste funciton

2008-06-18 Thread Søren Højsgaard
For detailed control of such things see ?sprintf and ?formatC Søren -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Tine Sendt: 18. juni 2008 10:21 Til: r-help@r-project.org Emne: [R] Number of digits in paste funciton Hi! Does anyone know hot to

[R] Number of digits in paste funciton

2008-06-18 Thread Tine
Hi! Does anyone know hot to set number of digits to be printed in function 'paste'? Tine Mlač __ 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.h