Hello again,

Let say I have a matrix:

Mat <- matrix(1:12, 4, 3)

And a vector:

Vec <- 5:8

Now I want to do following:

Each element of row-i in 'Mat' will be divided by i-th element of Vec

Is there any direct way to doing that?

Thanks for your help

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

Reply via email to