title: Create spatial objects in R useful for coordinates() and spsample()
body: <p>I'm trying to use this code, adapted from dataset <code>meuse</code></p>
  
  <pre><code>data&lt;-list(var1,var2,x,y)
  
  coordinates(data)=~x+y
  
  grid = spsample(data, type = "regular", cellsize = c(0.05,0.05))
  
  vt &lt;- variogram(var1 ~ var2,data=data)
  
  vt.fit &lt;- fit.variogram(vt, vgm(0.2, "Sph", 800, 0.05))
  
  gstatobj &lt;- gstat(id = 'var1', formula = var1 ~ var2, model=vt.fit, set = list(gls=1))
  </code></pre>
  
  <p>My goal is creating a grid, like <code>meuse.grid</code>. But <code>coordinates</code> doesn't work... list isn't the right command.</p>
  
  <p>What shall I use?
  Is correct the way I'm using to create the grid?</p>