title: Double for loop in R creating a matrix
body: <p>I would like to create a 5x5 matrix in R using two for loops. 
  I have 5 numbers p_j and q_i with i and j in {1,2,3,4,5}. 
  I would like to create a matrix with where the element in (j,i) is given by p_j * q_j. j-th row and i-th column. 
  So, first of all I would like to create an empty matrix <code>m</code> and then filling the matrix using the for loops.</p>
  
  <blockquote>
    <p>for (i in 1:5){   for (j in 1:5){
           } }</p>
  </blockquote>