I am trying to code a function in R which takes one argument (matrix) and multiply all odd values in it by 0.618.
This is what I got so far, but it is my first time working with R matrixes and not sure how to replace values in for loop, or if it's better to do it after multiplying numbers.