[R] problem with matrix
Denis Francisci
denis.francisci at gmail.com
Mon May 16 18:30:16 CEST 2016
Thank you very much,
just what I needed!!
2016-05-16 18:25 GMT+02:00 Duncan Murdoch <murdoch.duncan a gmail.com>:
> On 16/05/2016 12:10 PM, Denis Francisci wrote:
>
>> Hi all,
>> I've a simple question.
>> I have a matrix with same values over and under the diagonal. That's an
>> example:
>> [,1] [,2] [,3]
>> [1,] NaN 45 63.43495
>> [2,] 45.00000 NaN 90.00000
>> [3,] 63.43495 90 NaN
>> How can I extract just the three values over (or under) the diagonal and
>> convert them in a vector like this: 45, 63.43495, 90 ?
>>
>> Thank's in advance
>>
>>
> See ?upper.tri.
>
> Duncan Murdoch
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list