[R] formatting output

Peyuco Porras Porras . levin001 at 123mail.cl
Mon Feb 28 19:05:46 CET 2005


   Dear R-users

   A  basic  question  that I wasn't able to solve: Is it possible to get
   the  results  of the function 'quantile' expressed as data.frame? What
   I'm  doing  is  to  apply the following code to get the quantiles in a
   particular dataset:

   tmp<-tapply(data$DEN,list(Age=data$AGE,Sex=data$SEX),quantile)

   and  then I save this output to HTML using the library R2HTML. However
   in  order  to  format  the  tables  in  HTML I have to use the command
   HTML.data.frame(...)  which  allows  me  to  define,  for example, the
   number of digits in the html table.

   But  the object 'tmp' is not a dataframe and I can't coarce it to this
   format.  Is  it  possible  to  get  the  results of this function as a
   dataframe? I  know  that  I'm probably missing some important concepts
   here but Im not very good in programming.

   Any hint will be appreciated

   Regards

   Peyuco



More information about the R-help mailing list