Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: error 109
From
"Dimitriy V. Masterov" <[email protected]>
To
[email protected]
Subject
Re: st: error 109
Date
Thu, 3 Feb 2011 14:26:52 -0500
Natalia,
Try
generate str id_v3 = substr(v3,1,8)
DVM
On Thu, Feb 3, 2011 at 2:14 PM, Natalia Batista <[email protected]> wrote:
> Hi Statalist
>
> I´m tring to create a string variable (id_v3) from another string variable
> (v3). But I want just the 8 first numbers. I tried the following:
> generate str id_v3 = string(v3,"%-08.0f")
>
> By it did not worked. I got the error 109: type mismatch
>
> How can I solve it?
>
> Thanks
>
> --
> Natalia Batista
> University of Sao Paulo at Ribeirao Preto
> Department of Economics
> tel +55 16 3602 0506 (office)
> fax +55 16 3633 4488
>
>
>
>
>
>
> *
> * 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/
>
*
* 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/