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, statalist.org is already up and running.


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

st: RE: RE: stata could delete all the row of a variable containing characters like "¿"


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: stata could delete all the row of a variable containing characters like "¿"
Date   Mon, 26 Apr 2010 15:03:52 +0100

-asciiplot- is by Michael Blasnik, Svend Juul and myself. 

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss

Stata will delete those happily if you find a way to tell it what to -drop-.
In this case, -ssc d asciiplot- by Nick Cox tells you which number to pass
to -char()- to check for the presence of the character:

*******
clear*

inp str10 mystrvar
"hello"
"goo¿d-bye"
"he¿lo"
"goo¿d-bye"
"hello"
"hello"
end

list, noo

drop if strpos(mystrvar, "`=char(191)'")!=0

list, noo
*******

carmen gamarra

Another question, stata could delete
all the row of a variable containing characters like
"¿", for example.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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