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: specifying marker labels in twoway scatter
From
[email protected]
To
[email protected]
Subject
RE: st: specifying marker labels in twoway scatter
Date
Tue, 3 May 2011 23:15:41 +0200
Thank you very much, that was exactly what I was referring to,
regards Alex
Citeren Nick Cox <[email protected]>:
> Here's another way to get that row vector in Stata.
>
> numlist "1/100"
> local numlist `r(numlist)'
> local numlist : subinstr local numlist " " ",", all
> matrix b = (`numlist')
> Nick
> [email protected]
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Nick Cox
> Sent: 03 May 2011 19:41
> To: '[email protected]'
> Subject: RE: st: specifying marker labels in twoway scatter
>
> That creates a row vector with values 1(1)100.
>
> The nearest equivalent could be something like
>
> matrix a = J(1,100,1)
>
> forval j = 1/100 {
> matrix a[1,`j'] = `j'
> }
>
> except that I am rusty on Stata matrices.
>
> Or perhaps you want 100 variables, 1 observation, with values 1..100.
>
> set obs 1
> forval j = 1/100 {
> gen a`j' = `j'
> }
>
> Or perhaps you don't mean what you say.
>
> Nick
> [email protected]
>
>
> [email protected]
>
> Is there an equivalent to Mata's A=(1..100) in 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/
>
> *
> * 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/