Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: bug in xpose.ado?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: bug in xpose.ado?
Date   Thu, 7 Nov 2002 17:02:40 -0000

[email protected]
>
> After taking a closer look at the code of -xpose- this
> morning, I now have a
> better understanding of how it goes about its business.
> -xpose- assigns the
> name "v" + an integer corresponding to the row number when
> it takes a first
> cut at interchanging rows and columns.  Then, and only then, are the
> variables renamed using the values of _varname in each row
> of the original
> set.  Given that there are 10 observations in the above example, the
> transposed variables are initially assigned names v1, v2,
> ..., v10.  When
> -xpose- subsequently attempts to rename the first variable
> of the transposed
> set, it tries
>
> 	rename v1 v6
>
> and Stata objects since, at this point, v6 already exists
> in memory.  Nick's
> wrapper works as a solution.  Still, a wrapper shouldn't be
> necessary in
> this instance since -xpose- is _designed_ to let users
> specify a variable
> (_varname) containing the names of the transposed variables.  I hope
> StataCorp will deem it necessary to amend -xpose- in an
> upcoming ado update;
> such updates and amendments are all the more important when bugs or
> "misfeatures" concern data management commands.

I'm sure that Stata Corp will attend to this.

My -xpose2- (indicated by the results
of a Unix-type -diff- comparing it with -xpose-) is not a "wrapper",
but at best a fixed -xpose-.

But Stata Corp will have a test
script for -xpose- and will be able to
test it, and/or come up with a better solution.

Nick
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index