The question is very simple. How to multiply every element of vector A by single element of vector B.
Here is the example:
> a
[1] 5 5 5 5 5 5 5 5
> b
[1] 250 252 252
The final result should return one object which looks similar to:
1 1250 1250 1250 1250 1250 1250 1250 1250
2 1260 1260 1260 1260 1260 1260 1260 1260
3 1260 1260 1260 1260 1260 1260 1260 1260
I've spent some time by trying do this by function for
but I couldn't get proper result.
Some examples how to achieve that will be perfect answer.
Thanks.