[ESS] Enter Stata pound sign thingies?
Paul Johnson
pauljohn32 at gmail.com
Mon May 19 21:49:56 CEST 2014
My RA wrote stata code like this, which temporarily declares the line
terminator to ; because there is a weird funny business about stata
and the deliminter.
#delim ;
local KeepVar "STU_ID SCH_ID G10COHRT F3D34 F3BYPNLWT byrace bysex
F1RGPP2 byurban byregion
bysibhom byincome bypared F2NAPAID F2PS1OUT F2HHPAR F2B25A F2B25D
F2C38 F3D33 F2B28R F3PSLCTR F3STLOANEVR F3STLOANAMT BYP83A BYP84
F3STLOANPAY F3D35 F3D30 F3D31 F3D27 F3D28B F3D28C F3D27 F3D29
F3ERN2011 F3ATTAINMENT F3EDSTAT F3EVR4YR F3EVR2YR F1A19A BYA14E
BYA23K F1S52B F1S52A F2B04";
#delim cr
Inside Stata itself, I can highlight that stanza and run it, but
inside Emacs/ESS, there seems to be no way to do it. Highlight the
whole thing, try to run the region:
. #delim ;
Unknown #command
. local KeepVar "STU_ID SCH_ID G10COHRT F3D34 F3BYPNLWT byrace bysex F1RGPP2 by
> urban byregion
invalid syntax
r(198);
. bysibhom byincome bypared F2NAPAID F2PS1OUT F2HHPAR F2B25A F2B25D
unrecognized command: bysibhom
r(199);
. F2C38 F3D33 F2B28R F3PSLCTR F3STLOANEVR F3STLOANAMT BYP83A BYP84
unrecognized command: F2C38
r(199);
. F3STLOANPAY F3D35 F3D30 F3D31 F3D27 F3D28B F3D28C F3D27 F3D29
unrecognized command: F3STLOANPAY
r(199);
. F3ERN2011 F3ATTAINMENT F3EDSTAT F3EVR4YR F3EVR2YR F1A19A BYA14E
unrecognized command: F3ERN2011
r(199);
. BYA23K F1S52B F1S52A F2B04";
unrecognized command: BYA23K
r(199);
. #delim cr
Unknown #command
Otherwise, I think the Emacs/ESS support for stata works well, the
color highlighting is great and the run line-by-line parts work fine,
except when they are the # thingies.
Suggestions?
pj
--
Paul E. Johnson
Professor, Political Science Assoc. Director
1541 Lilac Lane, Room 504 Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org http://quant.ku.edu
More information about the ESS-help
mailing list