[R] Transferring results from R to MS Word

Tom Backer Johnsen backer at psych.uib.no
Sun Oct 26 15:51:51 CET 2008


Gabor Grothendieck wrote:
> Seems there is a bug in one of the HTML methods in that digits=
> either does not get passed or used in certain cases.  It does seem
> that the HTML.data.frame method is not affected so this would
> be a workaround:
> 
> HTML2clip(as.data.frame(mean(attitude)), digits = 10)

Ah.  That is really useful.  Thanks.  However, it would be nice if the 
bug could be fixed in some way or another.  I may be wrong, but I think 
that I have used the HTML function before with less problems.  I suspect 
that the bug is a relatively recent one.

Tom
> 
> 
> On Sun, Oct 26, 2008 at 9:58 AM, Tom Backer Johnsen <backer at psych.uib.no> wrote:
>> To reply to myself, for anything that can be coerced into a table (matrices,
>> vectors) the best solution seems to to use the write.table () function to
>> write a .csv file, which is easily opened with a spreadsheet.
>>
>> The alternative is to use the HTML2clip () function (or the HTML function)
>> in the R2HTML library and then paste the clipboard into Excel.  That
>> alternative seems to be OK for objects as returned by the lm () function,
>> but little else.  Among other things, the function is extremely heavyhanded
>> in respect to rounding.  To see what I mean, try HTML2clip (mean(attitude)).
>>
>> So, are there any other alternatives?
>>
>> Tom
>>
>> ______________________________________________
>> R-help at 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.
>>


-- 
+----------------------------------------------------------------+
| Tom Backer Johnsen, Psychometrics Unit,  Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen,  NORWAY |
| Tel : +47-5558-9185                        Fax : +47-5558-9879 |
| Email : backer at psych.uib.no    URL : http://www.galton.uib.no/ |
+----------------------------------------------------------------+



More information about the R-help mailing list