Statalist The Stata Listserver


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

Re: st: RE: RE: Pgm 2 remove grammatical errors in log


From   Robert A Yaffee <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: Pgm 2 remove grammatical errors in log
Date   Wed, 10 May 2006 17:43:15 -0400

Nick,
 thanks.
 - Bob


Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University

home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
[email protected]

----- Original Message -----
From: Nick Cox <[email protected]>
Date: Wednesday, May 10, 2006 5:35 pm
Subject: st: RE: RE: Pgm 2 remove grammatical errors in log

> Such a program would need to find the error messages
> and then delete text backwards of that. Given the 
> variety of error messages, my guess is that this 
> would be better built in a scripting language or 
> as a good text editor macro or script. Then again 
> there would have to be safeguards that good stuff
> would not be deleted. 
> 
> Sounds challenging to me. Either way, if it existed, why 
> would the author keep quiet about such an achievement? 
> 
> My guess is that Robert is way too far downstream. 
> A better bet for now is to keep -cmdlog- as well as
> -log-, and edit them in parallel, removing the commands
> that offend. 
> 
> When I do this, it is not the syntax errors that are
> the main problem, although there are plenty. It is the 
> commands that are just repetitions and dead ends, but 
> perfectly legal. 
> 
> Nick 
> [email protected] 
> 
> Maarten Buis
> 
> > ----Robert A Yaffee wrote: 
> > > Does anyone know of a Stata do-file or ado-file program that 
> will go
> > > through your log file, find the syntactical errors, and remove 
> those> > errors along with the commands that generated them, 
> leaving a
> > > syntactically perfect output?
> > > Once such garbage is removed, it's easier to check over the 
> > output for
> > > other errors.
> > 
> > Bob:
> > It is not exactly what you are looking for and if your 
> > programs take long
> > to run than this is not very efficient but something like 
> > this may help:
> > 
> > *-----------begin example------------
> > program valid
> > 	capture `0'
> > 	if !_rc `0'
> > end
> > 
> > sysuse auto
> > set trace on
> > valid reg bla blub
> > valid reg price mpg foreign
> > *-----------end example-------------
> 
> *
> *   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/
> 
*
*   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