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

st: AW: string variable

From   "Martin Weiss" <>
To   <>
Subject   st: AW: string variable
Date   Fri, 28 Aug 2009 09:59:36 +0200


Sue may also want to consult Nick`s


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Sue
Gesendet: Freitag, 28. August 2009 05:38
Betreff: st: string variable

Dear all,

I was trying to do some simple data management with a string variable.
More specifically, I did:

insheet using bankyears.csv, clear
keep if bankname == "Fidelity Bank" | bankname == "Citibank"

which dropped all observations. When I looked at the data, it turned
out that the width of the single space between words was different (it
was wider in stata than in my editor, if this makes sense) although it
was still just one space. I've tried

replace bankname = subinstr(bankname, " ", "", .)

which didn't work. I could encode the variable then single out the
numeric value of the observations that I want to keep, but I was
wondering if there was a non-manual way around this. If anyone has
advice on this, I'd appreciate it.
*   For searches and help try:

*   For searches and help try:

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