title: Outer Sum in R?
body: <p>I am just a beginner in R, but could not find a solution for my problem so far. How can I create a matrix out of two vectors like this? In Excel it's totally easy, but how can I do this in R?</p>
  
  <pre><code>A = c(10,15,30)
  B = transpose(A) --&gt; the transposed matrix of A
  =&gt;  10
      15 
      30
  </code></pre>
  
  <p>I also want to make the calculation: A/(A+B) --> 10/(10+10) = 0.5 ; 15/(15+10) = 0.6 and so on. </p>
  
  <p>So that I get a n x n Matrix with probabilities in the end like this:</p>
  
  <pre><code>                10   15   30
             10   0.5  0.6  0.75
  VResult =  15   0.4  0.5  0.66
             30   0.25 0.33 0.5
  </code></pre>
  
  <p>I need to apply this easy example to a Vector with 32 numbers so I need a way to calculate this. The new matrix should then be saved. It would be really nice if you guys could help me out!</p>