Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Generating Random Number


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   Re: st: Generating Random Number
Date   Wed, 24 Jan 2007 13:15:16 -0800 (PST)

Yazhen,

When you look closely you can see that the left and right quotes are
different.

observation`i' (correct)
observation'i' (incorrect)

Friedrich

--- Yazhen Gong <[email protected]> wrote:
> Hi Joseph,
> 
> I tried to replicate the program that you have written
> as an excercise, but I had a problem.  I tried to
> replicate:
> 
> forvalues i=1/2{
>     generate str observation'i'="An observation"
> }
> 
> When I typed the closed bracket } ,Stata returned me
> with an error message showing "invalid name".  But
> when I copied the same three lines from your email,
> there was no error message.  I cannot figure out the
> reason.  Would you please to give me a hint?
> 
> Thanks!
> 
> Yazhen
> --- Joseph Coveney <[email protected]> wrote:
> [snip]
> > forvalues i = 1/2 {
> >     generate str observation`i' = "An observation"
> > }



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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