Skip to content

zero out the dataframe?

3 messages · Philip A. Viton, Michael Sumner, Edzer Pebesma

#
Given a Spatial*DataFrame, is there some easy way to delete the
dataframe objects, leaving only the Spatial* part? (I have a
very large spatial dataframe, and I want to do come calculations that
don't involve the data part; and I hope that this could
speed things up). I tried setting the data slot to NULL, but
apparently this isn't allowed.

Thanks!


------------------------
Philip A. Viton
City Planning, Ohio State University
275 West Woodruff Avenue, Columbus OH 43210
viton.1 at osu.edu
#
as(x, "Spatial*") will do it
On Mon, Apr 29, 2013 at 10:55 PM, Philip A. Viton <viton.1 at osu.edu> wrote:

  
    
#
You still need to fill out the *. The method

  geometry(object)

does it too, indifferent to what your * is. The generic

  addAttrToGeom(object, dataFrame)

does the reverse, for every *.
On 04/29/2013 03:57 PM, Michael Sumner wrote: