title: How to create sparse Matrix in R
body: <p>I have a dataframe <code>input</code>, just like below format:</p>
  
  <pre><code> queryid  wifi rssi
  1 0004920b wifi1   10
  2 0004920b wifi2   20
  3 1114920b wifi3   15
  4 11000492 wifi1   -10
  </code></pre>
  
  <p>And I want to create a sparse Matrix use this <code>input</code> dataframe.
  for example:</p>
  
  <pre><code>queryid   wifi1  wifi2  wifi3
  0004920b   10      20    .
  1114920b    .       .    15
  11000492   -10      .    .
  </code></pre>