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
zero out the dataframe?
3 messages · Philip A. Viton, Michael Sumner, Edzer Pebesma
as(x, "Spatial*") will do it
On Mon, Apr 29, 2013 at 10:55 PM, Philip A. Viton <viton.1 at osu.edu> wrote:
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
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Michael Sumner Hobart, Australia e-mail: mdsumner at gmail.com
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:
as(x, "Spatial*") will do it On Mon, Apr 29, 2013 at 10:55 PM, Philip A. Viton <viton.1 at osu.edu> wrote:
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
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de