title: RPy2 Convert Dataframe to SpatialGridDataFrame
body: <p>how can a Dataframe be converted to a SpatialGridDataFrame using the R maptools library? I am new to Rpy2, so this might be a very basic question.</p>
  
  <p>The R Code is:
  coordinates(dataf)=~X+Y</p>
  
  <p>In Python:</p>
  
  <pre><code>import rpy2
  import rpy2.robjects as robjects
  r = robjects.r
  # Create a Test Dataframe 
  d = {'TEST': robjects.IntVector((221,412,332)), 'X': robjects.IntVector(('25', '31', '44')), 'Y': robjects.IntVector(('25', '35', '14'))}
  dataf = robjects.r['data.frame'](**d)
  r.library('maptools')
  # Then i could not manage to write the above mentioned R-Code using the Rpy2 documentation
  </code></pre>
  
  <p>Apart this particular question i would be pleased to get some feedback on a more general idea: My final goal would be to make regression-kriging with spatial data using the gstat library. The R-script is working fine, but i would like to call my Script from Python/Arcgis. What do you think about this task, is this possible via rpy2?</p>
  
  <p>Thanks a lot!
  Richard</p>