[R] HTML nsmall vector format problem

2006-06-09 Thread john seers \(IFR\)
Hello All I am having a bit of trouble formatting my HTML with the desired number of digits after the decimal place. Am I doing something wrong/misunderstanding or is it a bug? Looking at the example supplied with ?HTML.data.frame: HTML(iris[1:2,1:2],nsmall=c(3,1),file=) Gives html

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread tshort
John, I don't think nsmall uses a vector. Try the following with format (which HTML.data.frame uses): format(iris[1:2,1:2],nsmall=c(3,1)) Sepal.Length Sepal.Width 15.100 3.500 24.900 3.000 It looks like you'll have to do a format column by column with a loop. -

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread john seers \(IFR\)
at http://www.ifr.ac.uk/edisclaimer/ Web sites: www.ifr.ac.uk www.foodandhealthnetwork.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of tshort Sent: 09 June 2006 11:54 To: r-help@stat.math.ethz.ch Subject: Re: [R] HTML nsmall vector format

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread Short, Tom
: Friday, June 09, 2006 7:19 AM To: Short, Tom; r-help@stat.math.ethz.ch Subject: RE: [R] HTML nsmall vector format problem Hi Tom Thanks for the reply. I see what you are saying - that format does not format using an nsmall vector, though the documentation (of HTML.data.frame) and the example

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread john seers \(IFR\)
PROTECTED] Sent: Friday, June 09, 2006 7:19 AM To: Short, Tom; r-help@stat.math.ethz.ch Subject: RE: [R] HTML nsmall vector format problem Hi Tom Thanks for the reply. I see what you are saying - that format does not format using an nsmall vector, though the documentation (of HTML.data.frame