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]
st: replicate matrix elements
From
Robert Duval <[email protected]>
To
[email protected]
Subject
st: replicate matrix elements
Date
Thu, 26 Jan 2012 16:45:55 -0600
Hi,
Is there a command in Stata to construct a vector
A= (1,1,1,4,4,4)
out of an original vector (1,4) by replicating its elements?
In R this would be done with
rep(c(1,4), each=3, times=1)
Any suggestions will be appreciated
robert
*
* 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/