I just noticed something I didn't anticipate about how -describe- counts the variables in a varlist supplied to it. My apologies for the noise if this is well-known to most users.
-describe- returns in r(k) the number of variables in the entire data set, not the number in the varlist fed to it. I didn't find any documentation that made this clear. It's not a big deal, of course, but the situation in which I encountered it is not a strange use-case: I did something like
because I wanted to know the number of variables in the unabbreviated varlist without having to count them by hand. So, while there are other less convenient ways to get that count, -describe- won't help.
-describe- returns in r(k) the number of variables in the entire data set, not the number in the varlist fed to it. I didn't find any documentation that made this clear. It's not a big deal, of course, but the situation in which I encountered it is not a strange use-case: I did something like
Code:
describe ThisVar-ThatVar

Comment