I have a hard time to destring some variables with both characters and numbers. The numbers are what I want. The characters may contain " ' ". If I include this character in the option of ignore, I will get error message of mismatch type. If I don't, I will be reminded that the ...
I have copy-pasted the data into Stata, and it thinks they are strings. So far I have tried: destring gdppercap, generate(gdppercap_n) but get gdppercap contains nonnumeric characters; no generate And: encode gdppercap, gen(gdppercap_n) but get a variable numbered from ...
2810 Check if a variable is a string in JavaScript 4742 How do I read / convert an InputStream into a String in Java? 3363 How do I iterate over the words of a string? 3513 How do I convert a String to an int in Java? 3570 How to check if a string contains a substring in B...
(use -help destring- to read about it, or you can access it via the menu Data -> Create or change data -> Other variable-transformation commands -> Convert variables from string to numeric) The Stata documentation is very good; you could for example answer this question by typing: search...
In your case one solution >>> is to -destring- the string variables before the loop, but then the >>> loop will convert back, so that does not appeal. >>> >>> Another is to select numeric variables beforehand. -ds- will do this >>> >>> ds srhcareactivity1-srhcareactivity6 ,...
To "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> Subject RE: st: How to insert decimal point? Date Tue, 23 Aug 2011 16:08:56 -0600hello Rich! I tried your command for the string version and it worked! Thank you very much! I also tried to destring that _after...