Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

[no subject]



We recognize that Stata needs to "know" the explicit cells in table in its
output and that is something we want to address in the future.

I noted in my earlier email that I wasn't able to duplicate David's problem
with copying a table in Stata 10.  That was only partially correct.  I didn't
duplicate David's problem because I created a table using different variables
which is why I got different results.

Here is David's example:

. sysuse auto
(1978 Automobile Data)

. tab2 mpg rep78

-> tabulation of mpg by rep78  

   Mileage |                   Repair Record 1978
     (mpg) |         1          2          3          4          5 |     Total
-----------+-------------------------------------------------------+----------
        12 |         0          0          2          0          0 |         2 
        14 |         0          1          2          2          0 |         5 
        15 |         0          0          1          1          0 |         2 
        16 |         0          1          2          1          0 |         4

...

        41 |         0          0          0          0          1 |         1
-----------+-------------------------------------------------------+----------
     Total |         2          8         30         18         11 |        69 


If you select the whole table, select Edit > Copy Table, and paste it into
another application, you get

Mileage		Repair	Record	1978
(mpg)	1	2	3		4	5	Total
							
12	0	0	2		0	0	2 
14	0	1	2		2	0	5 
15	0	0	1		1	0	2 
16	0	1	2		1	0	4 

...

41	0	0	0		0	1	1 
							
Total	2	8	30		18	11	69 


The problem is that the first line of the table header looks like any other
row of output but the variable label for rep78, "Repair Record 1978", contains
spaces.  That's what's actually adding the extra tab stop.  Copying from the
second line of the table header will avoid the problem but that requires
manually entering the first line of the table header in your other application
after pasting.

A new feature of Stata 10 for Windows and Macintosh users allows you to copy
output from Stata and paste it into an application such as a word processor
and have the output appear exactly as it does in Stata.  Selecting Edit > Copy
as Picture will copy selected text from the Results or Viewer windows as a
metafile such as a Windows metafile (WMF) or Macintosh PICT.  When pasted into
an application such as Word, the pasted text will appear exactly as it does in
Stata and can be edited if your application allows editing of WMF or PICT.
Copy as Picture is well suited for copying tables from Stata if used for
displaying output.  However, it can't be used as a replacement for copying a
table from Stata to an application such as Excel as a way of entering data.

-Chinh Nguyen
 [email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index