Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: new reshape command compatibility issue


From   Kevin Crow <kcrow@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: new reshape command compatibility issue
Date   Mon, 25 Aug 2008 12:51:31 -0500

James Muller <james.s.muller@gmail.com> reported that the
August 11, 2008 update of the -reshape- command no longer allows
variable names longer than 20 characters when reshaping from wide
to long.  He is correct.  The fix for this bug will be released
in the next ado-file update -- tomorrow or by Wednesday at the
latest.

Kevin Crow
StataCorp

If the program also uses current features of Stata then version
statements would have to be splattered all over the place. More
involved than globally replacing "reshape" with "reshape_10".

I should note this is a general post, not specific to my own problem.

The issue I'm trying to underline is that the current version of
-reshape- does not handle variables named longer than 20 characters.
This is a severe limitation that will cause many existing programs to
fail. The best solution is to reprogram the current -reshape- program
without this constraint.

Who maintains reshape? Statacorp?

James





On Mon, Aug 25, 2008 at 11:18 AM, Martin Weiss
<martin.weiss@uni-tuebingen.de> wrote:
Would a -version- statement not be easier?

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of James Muller
Sent: Monday, August 25, 2008 5:06 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: new reshape command compatibility issue

Hi list,

A new major version of reshape was released, but it imposes a restriction on
the maximum length of variables it can reshape (at least from wide->long).
Specifically, reshape fails on variables with names longer than 20
characters.

I realized this when it caused a large (a couple of thousand do-files
involved) system to fail...

There's a quick solution, but it sucks. The old reshape command is still
available as the command reshape_10. The solution is to replace all reshape
command calls with reshape_10. It is a shame 'reshape' is also a word in
natural
language.

Under the hood, reshape obtains details of the variables via the 'char'
system (?), which creates variables describing variables from your dataset,
prefixing them... That is, the dataset variable name plus the prefix can
violate Stata's 32-character variable name limit.

I ask, is there the possibility of thes very important Stata command,
reshape,
being modified so that it can accept variable named according to the general
convention in Stata?

As I say, there is the option of using reshape_10, but, well, that's a lazy
solution.

Cheers

James
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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