[R] Plot lines whose angle and length depict vector quantities

Sarah Goslee sarah.goslee at gmail.com
Fri Sep 27 21:44:53 CEST 2013


It's a straightforward trigonometry problem, isn't it?

On Fri, Sep 27, 2013 at 2:56 PM, Conor Ryan <miolmor at gmail.com> wrote:
> I am trying to plot points on a map for each ship locations (lat/long),
> where
> each point is a line whose angle (degrees) denotes ships heading and whose
> line length denotes it's speed. Unfortunately arrows(); p.arrows (sfsmisc)
> and ms.arrows (TeachingDemos) require start and end coordinates but I only
> have a single coordinate and an angle to work with. Can you suggest any
> other packages or commands that might allow me to plot this? Alternatively,
> can anyone suggest a method of making 'angle' a vector quantity when using
> the arrows function? Any advice would be much appreciated!
>

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list