title: Pass list from python to R through rpy2
body: <p>I'm trying to make a simple call to a <code>R</code> package (<code>ks</code>) from within python through <a href="http://rpy.sourceforge.net/rpy2/doc-2.3/html/index.html" rel="nofollow">rpy2</a>. This is what I would like to achieve:</p>
  
  <pre><code>import rpy2.robjects as robjects
  
  # Define two matrices.
  matrix1 = [[1,1,1,1], [3,3,3,3]]
  matrix2 = [[1,1,1,1], [3,3,3,3]]
  
  # Call 'ks' function to obtain p_value.
  p_val = robjects.r('''
  library(ks)
  kde.test(x1=matrix1, x2=matrix2)$pvalue''')
  
  print p_val
  </code></pre>
  
  <p>I tried following the <a href="http://rpy.sourceforge.net/rpy2/doc-2.3/html/introduction.html#calling-r-functions" rel="nofollow">documentation from rpy2</a> but it is very scarce. Any help would be appreciated.</p>