Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: add column in -tabout- for symbols

From   "Kaulisch, Marc" <>
To   <>
Subject   AW: st: add column in -tabout- for symbols
Date   Mon, 13 Jun 2011 15:36:06 +0200


Thanks a lot for your suggestion and apologies for my inappropriate
change in the second table.

In my concrete example I have several spaces in v1 and so I need a
different approach, but the following does the trick for me:
insheet using test_tabout.txt, nonames clear
gen v11 = ""
replace v11 = "N" if v1 == "N"
replace v11 = "%" if regexm(v1, "%")
replace v1 =  subinstr(v1, " %", "", 1)
replace v1 = subinstr(v1, "N", "", 1) if v11 == "N"
order v1 v11

outsheet using "test_tabout_updated.txt", ///
	replace nonames noquote

Thanks again, (and if someone does know a better solution for -tabout- I
would happy to integrate that ;-) )


*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index