[R] predict.lm - standard error of predicted means?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jul 20 19:25:15 CEST 2005
On Wed, 20 Jul 2005, Peter Dalgaard wrote:
> mark salsburg <mark.salsburg at gmail.com> writes:
>
>> Can someone please refer me to a function or method that resolves this
>> structuring issue:
>>
>> I have two matrices with identical colnames (89), but varying number
>> of observations:
>>
>> matrix A matrix B
>>
>> 217 x 89 16063 x 89
>>
>> I want to creat one matrix C that has both matrices adjacent to one
>> another, where matrix A is duplicated many times to create the same
>> row number for matrix B, i.e. 16063.
>>
>> matrixA matrix B
>> matrixA
>> matrixA
>>
>> so matrix C will be 16063 x 178
>>
>> I've tried cbind() and merge() with no success..
>
> A: What the !!##"¤ does this have to do with the subject line?
>
> B: This should do it:
>
> cbind(A[rep(1:217,length=16063),], B)
But note that makes 74 + 5/217 copies of A, and I did wonder if that was
the intention (or if not, what was intended).
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list