Dear All, When I tried to run the following code (taken from the *spdplyr* package vignettes):
library(spdplyr) library(maptools) data(wrld_simpl) worldcorner <- wrld_simpl %>% mutate(lon = coordinates(wrld_simpl)[,1], lat = coordinates(wrld_simpl)[,2]) %>% filter(lat < -20, lon > 60) %>% dplyr::select(NAME) I got the following error messages: Error in (function (cl, name, valueClass) : c("assignment of an object of class “tbl_df” is not valid for @‘data’ in an object of class “SpatialPolygonsDataFrame”; is(value, \"data.frame\") is not TRUE", "assignment of an object of class “tbl” is not valid for @‘data’ in an object of class “SpatialPolygonsDataFrame”; is(value, \"data.frame\") is not TRUE", "assignment of an object of class “data.frame” is not valid for @‘data’ in an object of class “SpatialPolygonsDataFrame”; is(value, \"data.frame\") is not TRUE") I am running R 3.3.3 with the latest CRAN version of *spdplyr* (0.1.3) on Windows 10. Thanks. Best, Shige [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.