Quantcast
Channel: The Stata Blog - Latest Comments
Viewing all articles
Browse latest Browse all 1126

Re: Export tables to Excel

$
0
0

You can check r(r) after tabulate and see how many levels there are in your variable and then use if for your labels.


if (`r(r()' ==2) {
B4 = "Female" ///
B5 = "Male"
}
else {
....

B4 = "Female"
....

}


Viewing all articles
Browse latest Browse all 1126

Trending Articles