Skip to content
Back to formatted view

Raw Message

Message-ID: <CAM_vju=Bz8p=z0Uc1JUK46cGSBmB9h62hV_iSqxcqkOfCC7TwQ@mail.gmail.com>
Date: 2011-10-13T00:33:34Z
From: Sarah Goslee
Subject: getting data associated with coordinates in a spatial data frame
In-Reply-To: <CB48FBE34FD7F64D8FFDBB410C26CF750138C72B8D80@EXCH07-VS1.spu.local>

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