

Dear Berend,

 

No need to devide what all you need a indentity matrix with same
dimesion.

  Following is one way to achieve this.

 

  mat Hi,
> 
> I have a matrix as below:
> 
> mat=
>     [,1]  [,2]  [,3]
> [1,]    1    4    7
> [2,]    2    5    8
> [3,]    3    6    9
> 
> What I want to do is, I would like to divide each column with its
own
> value, in order to get value 1.
> Is there any simple script for that?

mat/mat

Berend

______________________________________________
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 [1]
and provide commented, minimal, self-contained, reproducible code.



Links:
------
[1] http://www.r-project.org/posting-guide.html


	[[alternative HTML version deleted]]

