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

Re: st: "unrecognized command: merge" when reshaping


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: "unrecognized command: merge" when reshaping
Date   Wed, 13 Apr 2005 09:42:43 -0400

At 02:10 PM 4/13/2005 +0100, Dan Rigby  wrote:
When I run these commands I get an error message. The data file
is 2000 obs and I want to reshape it into 50 x 50 after the density
plot:

set matsize 800
kdens2 var6 var7 , saving(c:/testdan2, replace)
clear
use c:/testdan2
reshape wide d _var7 _var6, i(_i) j(_j)

the error reads:
unrecognized command:  merge
r(199)

there is a similar question from last year in the statalist archive but
I can't see an answer to it.

Any advice appreciated.

thanks,
dan rigby
[...]
I suspect that you are missing merge.ado, or it is not on your adopath. Try typing
merge
and see if you get
unrecognized command: merge

Originally, merge was a built-in command. More recently, they changed its name to _merge and gave you merge.ado as a front-end to access it, and to provide some extra features.

I, too, had the same situation for a while, until I was able to update my ados. As a stopgap measure, you can manually type,
prog def merge
_merge `*'
end

This will give you access to _merge as if it were named merge. That is, you get the base-level functionality (the old merge), but without the extra features of merge.ado such as merging multiple files in one call. In your particular situation, whether this works will depend on whether reshape makes use of the extra features (assuming that it is reshape where the error occurred); I don't know, but I suspect not.

But the proper solution, assuming I am correct, is to update your ados. Or possibly check to see that your adopath is properly set.

-- David


David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404
*
* 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