Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: estabb and rtfutil combination.


From   Amadou DIALLO <stata.diallo@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: estabb and rtfutil combination.
Date   Wed, 13 Feb 2013 08:45:51 +0100

Dear Roger,

Many thanks. This is indeed a partial solution to my problem and
definitely, a rtfappend command is most needed and welcome. I wish
this could be released soon!

I also have a couple of questions, to try to find a workaround:

- do you know how to merge 2 rtf files? I googled but cannot find any
proper answer and I don't how to take advantage of the rtf mail merge
tools.

- do you have any tutorial on using rtfutil/listtab with tables, as
the ones available for estout and esttab? The tables I produced using
listtab are messy and the /landscape option I am inserting in my rtf
code is not allowing even to view them in landscape format. The book
by Sean Burke that I bought warned against producing tables in rtf but
is not indeed providing detailed examples, so if anyone can point me
to a good tutorial, that is most welcome.

- is there any way to resize the graphs I am inserting? I know there
have been some discussions around this topic, but am wondering if any
progress has been made on it.

Nonetheless, again thank you for producing rtfutil. It saves me a lot
of time in producing standardized reports for my department.

Warmest regards.

Bachir.

2013/2/12, Roger B. Newson <r.newson@imperial.ac.uk>:
> I think the answer is to use -rtfclose- before -esttab-. The -esttab-
> command is designed to append tables to intact .rtf files that have
> already been closed. So, in your case, you can write a program like this
> one:
>
> **** BEGINNING OF CODE - CUT HERE
> clear;
> sysuse auto;
> tempname handle;
> rtfopen `handle' using "esttabrtfopenexample.rtf", replace;
> file write `handle' _n "{\line}";
> file write `handle' _n "{\header\pard\sl360\slmult1\qr\plain\f0\chpgn
>    {\i 	\fs20 Auto data analysis} \par}";
> eststo tabl: estpost ta rep for;
> rtfclose `handle';
> esttab tabl using  "esttabrtfopenexample.rtf" , cell(colpct(fmt(2)))
>   label noobs varwidth(10) modelwidth(8) addnote("Source: Author")
>   append;
> **** END OF CODE - CUT HERE
>
> I don't know a way of inserting multiple -esttab- tables into a document
> produced by -rtfopen-. Perhaps I will add a -rtfappend- command to
> -rtfutil-.
>
> I hope this helps.
>
> Best wishes
>
> Roger
>
>
> Roger B Newson BSc MSc DPhil
> Lecturer in Medical Statistics
> Respiratory Epidemiology and Public Health Group
> National Heart and Lung Institute
> Imperial College London
> Royal Brompton Campus
> Room 33, Emmanuel Kaye Building
> 1B Manresa Road
> London SW3 6LR
> UNITED KINGDOM
> Tel: +44 (0)20 7352 8121 ext 3381
> Fax: +44 (0)20 7351 8322
> Email: r.newson@imperial.ac.uk
> Web page: http://www.imperial.ac.uk/nhli/r.newson/
> Departmental Web page:
> http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
>
> Opinions expressed are those of the author, not of the institution.
>
> On 10/02/2013 12:07, Amadou DIALLO wrote:
>> Hi,
>>
>> I'm trying unsuccessfully to combine results produced by 2 different
>> commands (rtfopen/file and estabb) into a single rtf file. The problem
>> is that rtfutil is very good at handling text and graphs but I findit
>> difficult to produce nice tables with desired formatting and
>> characteristics attributes that I want them to have (which estabb does
>> very well). Is there a workaround? See sample code below
>> (esttabrtfopenexample produce blank page while esttabrtfopenexample2
>> displays tables). Thanks in advance.
>>
>> clear
>> sysuse auto
>> tempname handle
>> rtfopen `handle' using "esttabrtfopenexample.rtf", replace
>> file write `handle' _n "{\line}"
>> file write `handle' _n "{\header\pard\sl360\slmult1\qr\plain\f0\chpgn
>> {\i 	\fs20 Auto data analysis} \par}"
>> eststo tabl: estpost ta rep for
>> esttab tabl using  "esttabrtfopenexample.rtf" , cell(colpct(fmt(2)))
>> label noobs varwidth(10) modelwidth(8) addnote("Source: Author")
>> append
>> esttab tabl using  "esttabrtfopenexample2.rtf" , cell(colpct(fmt(2)))
>> label noobs varwidth(10) modelwidth(8) addnote("Source: Author")
>> replace
>> rtfclose `handle'
>> exit
>>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
>


-- 
Amadou B. DIALLO, PhD.
Senior Economist, AfDB.
a.b.diallo@afdb.org
+21671101789
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index