title: How to generate multiple print statement in R script
body: <pre><code>roll2 &lt;- function(defaultDie = 1:6)
  {
  
      dice &lt;- sample(defaultDie,size=2,replace = T)
  ##output for dice is not printed    
  dice
     sprintf("Sum is %d ", sum(dice))
  
      ##sum(dice)
  }
  </code></pre>
  
  <p>Expected Output
  [1] 5 6
  [1] 11
  Right now im getting just
  [1] 11
  I want to understand why dice statement is ignored while running the script</p>