Bailey, Daniel
2011-Oct-12 19:37 UTC
[R] getting data associated with coordinates in a spatial data frame
If I know the specific coordinate in a spatial data frame, how can I access the data at that coordinate? My coordinates are labeled "x" and "y" in a data.frame "e". The data is in column "leachate". I want to say, basically: e$leachate@coordinates(2,3<mailto:e$leachate@coordinates(2,3>). Thanks, Daniel [[alternative HTML version deleted]]
Sarah Goslee
2011-Oct-13 00:33 UTC
[R] getting data associated with coordinates in a spatial data frame
Hi, On Wed, Oct 12, 2011 at 3:37 PM, Bailey, Daniel <bailed at spu.edu> wrote:> If I know the specific coordinate in a spatial data frame, how can I access the data at that coordinate? > > My coordinates are labeled "x" and "y" in a data.frame "e". The data is in column "leachate". > I want to say, basically: > e$leachate at coordinates(2,3<mailto:e$leachate at coordinates(2,3>).That's kind of mangled, but what about: e[e$x == my.x & e$y == my.y, "leachate"] (Depending on the form of your coordinates, you may also have to invoke FAQ 7.31.) Sarah> Thanks, Daniel >-- Sarah Goslee http://www.functionaldiversity.org
Maybe Matching Threads
- choosing an appropriate linear model
- distance matrix to coordinate format for spatial stats
- converting lat-long coordinates to Albers Conical Equal Area coordinates
- Finding local maxima (height) in a matrix data (6 spatial coordinates)?
- SPATIAL QUESTION: HOW TO MAKE POLYGONS AROUND CLUSTERS OF POINTS AND EXTRACT AREAS AND COORDINATES OF THESE POLYGONS?