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 at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: XML_TAB and Multicolumn Titles


From   Zurab Sajaia <zsajaia@hotmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   RE: st: XML_TAB and Multicolumn Titles
Date   Mon, 4 Jun 2012 16:26:17 -0400

Hi Hassan,
 
-xml_tab- can read equation names as well from the matrix and output those strings, if there are repeating string they will be automatically merged:
 
matrix A = 1, 2, 3, 4
matrix colnames A = Weight Height Weight Height
matrix coleq A = January January February February
 
xml_tab A, showeq ...
 
This will produce the output you need.
 
Alternatively, you can specify column names super-column names directly as options for -xml_tab- (matrix col/rownames have length restriction and don't allow some symbols...), you can write simply:
 
xml_tab B, showeq cnames(Weight Height Weight Height) ceq(January January February February)
 
Hope this helps,
Zurab



> Date: Mon, 4 Jun 2012 12:13:12 -0400
> Subject: st: XML_TAB and Multicolumn Titles
> From: hassan.enayati@gmail.com
> To: statalist@hsphsun2.harvard.edu
> 
> Hello,
> 
> I am using xml_tab to output a matrix into a table that can be read by
> excel. Everything looks great, but I am having one difficulty. Above
> by column names, I would like to insert additional titles that cover
> (in excel: are merged over) multiple columns. Essentially, I would
> like something that looks like the following.
> 
> |------- January ---------| |--------February---------|
> |--Weight--| |--Height--| |--Weight--| |--Height--|
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/ 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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