This worked example, hoping to be helpful, has been requested after a (my)
further enquiry about array manipulation.

I was looking for a command that is equivalent to repmat() in matlab and
that could also be applied to array.

(for Matlab users)
The Matlal code was the following:


temp_u=zeros(d,c,T);              <-creation of an array of dimensions d x
c x T full of zeroes
temp_u(1,:,:)=m_u;                <-filling the first row of each 'stratum'
with the rows of
                                    the matrix 'm_u'
temp_u=repmat(temp_u(1,:,:),d,1); <-filling the remaining rows (full of
zeroes) of 'temp_u' with
copies of the corrensponding 1st row

-- 
-------------------------------------------------------------------

Simone Salvadei

Faculty of Economics
Department of Financial and Economic Studies and Quantitative Methods
University of Rome Tor Vergata
e-mail: simone.salva...@uniroma2.it <federico.belo...@uniroma2.it>
url: http://www.economia.uniroma2.it/phd/econometricsempiricaleconomics/
<http://www.econometrics.it/>
-------------------------------------------------------------------

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to