>>
>> I'm also not buying the sqrt(length(a))+1 bit --- floor(2*length(a)) is more
>> like it.
>>
>
> Shouldn’t that be
>
> m <- sqrt(floor(2*length(a)))
> M <- matrix(0,m,m)
>
> for the general case?
>
> Berend
>
Closer, but I actually meant:
floor(sqrt(2*length(a)))
if k is m*(m+1)/2,
> On 10 Oct 2015, at 13:39, peter dalgaard wrote:
>
>>
>> On 10 Oct 2015, at 10:49 , Berend Hasselman wrote:
>>
>>>
>>> On 10 Oct 2015, at 10:00, David Winsemius wrote:
>>>
>>>
>>> On Oct 9, 2015, at 10:57 PM, Steven Yen wrote:
>>>
Dear
How do you construct a lower triangular m
> On 10 Oct 2015, at 10:49 , Berend Hasselman wrote:
>
>>
>> On 10 Oct 2015, at 10:00, David Winsemius wrote:
>>
>>
>> On Oct 9, 2015, at 10:57 PM, Steven Yen wrote:
>>
>>> Dear
>>> How do you construct a lower triangular matrix from a vector.
>>>
>>> I want to make vector
>>>
>>> a <- 1:
> On 10 Oct 2015, at 10:00, David Winsemius wrote:
>
>
> On Oct 9, 2015, at 10:57 PM, Steven Yen wrote:
>
>> Dear
>> How do you construct a lower triangular matrix from a vector.
>>
>> I want to make vector
>>
>> a <- 1:10
>>
>> into a triangular matrix
>>
>> 1 0 0 0
>> 2 3 0 0
>> 4 5 6
On Oct 9, 2015, at 10:57 PM, Steven Yen wrote:
> Dear
> How do you construct a lower triangular matrix from a vector.
>
> I want to make vector
>
> a <- 1:10
>
> into a triangular matrix
>
> 1 0 0 0
> 2 3 0 0
> 4 5 6 0
> 7 8 9 10
>
I'm not sure this method with logical indexing will be t
Dear
How do you construct a lower triangular matrix from a vector.
I want to make vector
a <- 1:10
into a triangular matrix
1 0 0 0
2 3 0 0
4 5 6 0
7 8 9 10
Thank you!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
6 matches
Mail list logo