Re: [R] working with matrices

2014-08-27 Thread PIKAL Petr
nal Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of anna pannas > Sent: Wednesday, August 27, 2014 5:55 AM > To: r-help@r-project.org > Subject: [R] working with matrices > > hello > > i want to fill a matrix by i

Re: [R] working with matrices

2014-08-27 Thread John Fox
Dear anna, Unless the original matrix has a massive number of columns, why not just use loops? R programmers often have an unnecessary phobia of loops, and will puzzle over a programming problem for hours that can be solved by loops in seconds. You don't say what specifically you want to do, bu

[R] working with matrices

2014-08-26 Thread anna pannas
hello i want to fill a matrix by its upper off diagonal elements specifically I want to take the first and second column of� the matrix and I apply a function to then that returns a single number which I want to place in the (1,2) entry of the matrix, then I want to take the first and third col