Hi Statalist, I'm writing with a question that seems to be uncomfortably simple, which I just can't sort out. I'm hoping someone can help me with an easy fix. The gist of the issue is that I would like to use table collect to present frequency and percent values, but after doing some table collect formatting, I don't seem to be able to get what I want. Here is a code example:
Here's the primary result, which has the number formatting I want, but has stacked frequency and percent in rows when I want them in columns: 
OK, fine. So then I add some formatting as follows:
And now I have the correct column formatting, but percentages are back to having >1 decimal place: 
Additional attempts to change the cell style don't appear to do anything:

I'm sure I'm just doing something wrong from a syntax perspective, but cannot for the life of me figure out what it is. Could someone assist if you spot my error?
Code:
webuse lifeexp, clear drop if safewater < 80 //this is just so that I can produce tables for this example that do not go on forever and ever table (var) region, stat(fvfrequency safewater) stat(fvpercent safewater) nformat(%9.0fc fvfrequency) nformat(%9.1fc fvpercent)
OK, fine. So then I add some formatting as follows:
Code:
collect style row stack, nobinder spacer collect recode result fvfrequency=col1 fvpercent=col2 collect layout (var) (region#result[col1 col2])
Additional attempts to change the cell style don't appear to do anything:
Code:
collect style cell var[safewater]#result[col1], nformat(%6.0fc)
collect style cell var[safewater]#result[col2], nformat(%6.1f) sformat("%s%%")
collect preview
I'm sure I'm just doing something wrong from a syntax perspective, but cannot for the life of me figure out what it is. Could someone assist if you spot my error?
