[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: problem with -mat_capp- command
Zurab Sajaia <firstname.lastname@example.org> asked about StataCorp fixing
undocumented command -mat_capp- and provided example code
> .matrix a= 1,2
> .matrix colnames a="one two" three
> .matrix b=1\2\3
> .mat_capp c : a b, miss(.z)
and suggested a possible fix using the -quoted- option with an
extended macro function
> problem seems to come from the line:
> mat colnames `bb12' = `:colfullnames `b1'' `:colfullnames `b2''
> and possible solution could be
> mat colnames `bb12' = `:colfullnames `b1', quoted' `:colfullnames `b2',
He then says
> (from reading the help, I was under impression that option 'quoted' was
> for -coleq-, roweq- only but it seems doing the same thing
> with -colfullnames- as well)
For those interested, see -help matmacfunc-. The -quoted- option
is only documented with the -roweq- and -coleq- extended macro
functions. The reason it is not documented with -rowfullnames-
(etc) is that it does something partly reasonable, but not what
you really want in all cases. I suggest avoiding the -quoted-
option except where it is documented (-coleq- and -roweq-).
In my first response, I indicated I would attempt to fix
-mat_capp- and report back if there were any difficulties.
Zurab's proposed solution caused some unintended problems with
other official Stata commands that use mat_capp. So instead, I
fixed mat_capp using calls to the st_matrixrowstripe() Mata
function (type -help mata st_matrixrowstripe()-). I am now
running the full suite of StataCorp test scripts to see if there
are any other hidden problems with my fix. Again, assume that
the -mat_capp- fix will be in the next update later this week.
A general comment: Try to avoid putting spaces into Stata matrix
name stripes. It is bound to cause you problems at some step
along the way because there are still many routines that are not
robust to seeing spaces in the name stripes.
Ken Higbee email@example.com
* For searches and help try: