On Fri, 20 Jun 2003 asanquer@virbac.fr wrote:
> I have a question on the sink function (I work with S-plus 6.1):
> I use sink to export all the results of a script in a word file.
> Some results are subsets of data frame, and i would like to choose the
> delimiter between columns.
> Now, S+ provides me this type of results:
>
> Case Group Age
> 67 W133 2 mg/kg/day NA
> 68 W134 2 mg/kg/day NA
>
> the delimiters is a variable number of blanks. To use this type of data in
> word, i would like to replace blanks by a tab.
> Is someone could help me? is there an options to specified?
If you want to export a rectangular object such as a matrix or data frame
to be used elsewhere, use one of the tools provided (write.table,
write.matrix(MASS) and exportData spring to mind). sink() gives you
already formatted results.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
|