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

2013-09-28 Thread Patrick Burns

On 27/09/2013 21:01, Bert Gunter wrote:

On Fri, Sep 27, 2013 at 12:44 PM, Sarah Goslee sarah.gos...@gmail.com wrote:

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


Indeed! (  (r,theta) to (x,y) coordinates  ) . So I wonder if this is
a homework problem. If so, the OP should note that we try not to do
homework here.


So that would make it unanimous that everyone here is trying
not to do homework.

Pat



Cheers,
Bert


On Fri, Sep 27, 2013 at 2:56 PM, Conor Ryan miol...@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

__
R-help@r-project.org mailing list
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.






--
Patrick Burns
pbu...@pburns.seanet.com
twitter: @burnsstat @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of:
 'Impatient R'
 'The R Inferno'
 'Tao Te Programming')

__
R-help@r-project.org mailing list
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.


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

2013-09-28 Thread Conor Ryan
Hi Jim, vectorField worked a treat - thanks!


On 28 September 2013 01:57, Jim Lemon j...@bitwrit.com.au wrote:

 On 09/28/2013 04:56 AM, Conor Ryan 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!

  Hi Conor,
 Try the vector.field function (plotrix).

 Jim



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


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

2013-09-28 Thread Conor Ryan
Certainly not a homework question. Elementary questions do not necessarily
indicate that one is a student! Always learning...

Dr Conor Ryan


On 28 September 2013 11:39, Patrick Burns pbu...@pburns.seanet.com wrote:

 On 27/09/2013 21:01, Bert Gunter wrote:

 On Fri, Sep 27, 2013 at 12:44 PM, Sarah Goslee sarah.gos...@gmail.com
 wrote:

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


 Indeed! (  (r,theta) to (x,y) coordinates  ) . So I wonder if this is
 a homework problem. If so, the OP should note that we try not to do
 homework here.


 So that would make it unanimous that everyone here is trying
 not to do homework.

 Pat



 Cheers,
 Bert


 On Fri, Sep 27, 2013 at 2:56 PM, Conor Ryan miol...@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.orghttp://www.functionaldiversity.org

 __**
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/**
 posting-guide.html http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.





 --
 Patrick Burns
 pbu...@pburns.seanet.com
 twitter: @burnsstat @portfolioprobe
 http://www.portfolioprobe.com/**blog http://www.portfolioprobe.com/blog
 http://www.burns-stat.com
 (home of:
  'Impatient R'
  'The R Inferno'
  'Tao Te Programming')


 __**
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/**
 posting-guide.html http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


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

2013-09-28 Thread Conor Ryan
Hi Greg, thanks for your help. I found vectorFields, as suggested by Jim
Lemon, in plotrix to be slightly easier (given my relatively basic R
language knowledge!). Kind Regards, Conor


On 27 September 2013 22:07, Greg Snow 538...@gmail.com wrote:

 The ms.arrows along with my.symbols in the TeachingDemos package does not
 require start and end points, it takes a single point along with the angle
 and length (and the length can be a single constant to have all the arrows
 the same length, or a variable to have different lengths).  You can also
 set an adjustment parameter to decide if the arrows should be centered on
 the point, start at the point, or end at the point.

 The ms.arrows function was designed for exactly what you describe.


 On Fri, Sep 27, 2013 at 12:56 PM, Conor Ryan miol...@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!

 [[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 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.




 --
 Gregory (Greg) L. Snow Ph.D.
 538...@gmail.com


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


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

2013-09-27 Thread Conor Ryan
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!

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


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

2013-09-27 Thread Sarah Goslee
It's a straightforward trigonometry problem, isn't it?

On Fri, Sep 27, 2013 at 2:56 PM, Conor Ryan miol...@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

__
R-help@r-project.org mailing list
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.


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

2013-09-27 Thread Bert Gunter
On Fri, Sep 27, 2013 at 12:44 PM, Sarah Goslee sarah.gos...@gmail.com wrote:
 It's a straightforward trigonometry problem, isn't it?

Indeed! (  (r,theta) to (x,y) coordinates  ) . So I wonder if this is
a homework problem. If so, the OP should note that we try not to do
homework here.

Cheers,
Bert

 On Fri, Sep 27, 2013 at 2:56 PM, Conor Ryan miol...@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

 __
 R-help@r-project.org mailing list
 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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

__
R-help@r-project.org mailing list
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.


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

2013-09-27 Thread Greg Snow
The ms.arrows along with my.symbols in the TeachingDemos package does not
require start and end points, it takes a single point along with the angle
and length (and the length can be a single constant to have all the arrows
the same length, or a variable to have different lengths).  You can also
set an adjustment parameter to decide if the arrows should be centered on
the point, start at the point, or end at the point.

The ms.arrows function was designed for exactly what you describe.


On Fri, Sep 27, 2013 at 12:56 PM, Conor Ryan miol...@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!

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 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.




-- 
Gregory (Greg) L. Snow Ph.D.
538...@gmail.com

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


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

2013-09-27 Thread Jim Lemon

On 09/28/2013 04:56 AM, Conor Ryan 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!


Hi Conor,
Try the vector.field function (plotrix).

Jim

__
R-help@r-project.org mailing list
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.