Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Tostring Question

From   Erika Kociolek <>
Subject   st: Tostring Question
Date   Mon, 16 Dec 2013 09:02:11 -0800

Hi there,

I am trying to convert a byte variable (byte_var) to a string so it
can be concatenated with other variables. Sometimes this variable is a
string when imported into Stata, and sometimes it is not (thus the
"capture confirm" code). When I do this using the tostring command,
for missing values of byte_var, I get "." instead of "" (missing).

Here is the code I'm using:

capture confirm numeric variable byte_var

if !_rc {
tostring byte_var, force replace

Any suggestions or assistance would be very helpful.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index