Re: [R] flow map lines between point pairs (latitude/longitude)

2011-03-17 Thread vioravis
I am working on a similar problem. I have to add two columns: one containing the US state to which the origin belongs and another one to add the state in to which destination belongs. All I have is the latitude and the longitude of the origin and destination. Are there any packages in R that can do

Re: [R] flow map lines between point pairs (latitude/longitude)

2008-07-02 Thread Richard and Barbara Males
made my day, thanks, worked just fine with a little bit of tweaking (flipping x and y around, basically). rapid response much appreciated Dick On Wed, Jul 2, 2008 at 5:25 PM, Ray Brownrigg <[EMAIL PROTECTED]> wrote: > Here's one solution, YMMV: > library(maps) > # Note, plot the map first to get

Re: [R] flow map lines between point pairs (latitude/longitude)

2008-07-02 Thread Ray Brownrigg
Here's one solution, YMMV: library(maps) # Note, plot the map first to get the aspect ratio (or projection) right map("county", xlim=range(df2VisitTrips[, c(5, 7)]), ylim=range(df2VisitTrips[, c(4, 6)]), col=8) map("state", add=T) map.axes() for (i in 1:length(df2VisitTrips[, 1])) { lines(df2Vi

[R] flow map lines between point pairs (latitude/longitude)

2008-07-02 Thread Richard and Barbara Males
I have a dataset giving traffic between pairs of ports, and the lat/lon of each port, roughly as follows: sample data as follows > df2VisitTrips[1:4,] Origin Destination NumberOfTrips OriginLatitude OriginLongitude DestinationLatitude DestinationLongitude 1 P1 P16 1