[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: could numlist return a comma separated list?
That's a pretty lousy solution. Here's a better one:
program cnumlist, rclass
local result "`r(numlist)'"
local result : subinstr local result " " ",", all
return local numlist "`result'"
i.e. this should take the same input as -numlist-.
Very little testing!
> -----Original Message-----
> From: firstname.lastname@example.org
> [mailto:email@example.com]On Behalf Of Nick Cox
> While I agree on this, see -cseplist- in -listutil- on SSC,
> as one of several possible solutions.
> Enzo Coviello
> > I would find useful if -numlist could return, as option, a
> > comma separated
> > numeric list.
> > There is some Stata function, i.e. -recode -inlist, that
> > needs as input a
> > comma separated list.
> > So we could feed them directly with the r(numlist) output.
> > I wonder if other Users would find useful this addition.
* For searches and help try: