Hi professors I'm finding the best package in R for manage a big database about vessels. I need to divided the travel of each boat into tracks. I have GPS points. I would join these points in a line on the map. I make that with the function "lines", but I can't divided by vessel or by track, I saw several packages, for tracking animals but they had specifically variables. And I don't add others like "type","destination" or "status". Can you give me a suggestion, please [[alternative HTML version deleted]]
It is difficult to advise you when you don't provide reproducible data. For example, you could include the first 6 lines of your data using dput(head(mydata)) If you have GPS points stored as easting, northing, and if you have a variable that identifies the vessel, and if your data are sorted by date and time, then you might be able to get the plot you want using something like this: plot(easting[vessel="This One"], northing[vessel="This One"], type="l") Jean On Thu, Oct 24, 2013 at 4:40 AM, Marta Tobeña <marta_mtm@hotmail.com> wrote:> Hi professors > I'm finding the best package in R for manage a big database about vessels. > I need to divided the travel of each boat into tracks. I have GPS points. > > I would join these points in a line on the map. I make that with the > function "lines", but I can't divided by vessel or by track, > > I saw several packages, for tracking animals but they had specifically > variables. And I don't add others like "type","destination" or "status". > > Can you give me a suggestion, please > > [[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. >[[alternative HTML version deleted]]
A good choice might be to store your data in objects of class SpatialLinesDataFrame Then you can assign any attributes you want to each line, such as your vessel, type, destination, or status. This will make it relatively easy to, for example, plot subsets of tracks specified by different attributes. SpatialLinesDataFrame objects are defined in the sp package. For further help, I would suggest the r-sig-geo mailing list. Also look at the CRAN Task View "Spatial". -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 10/24/13 2:40 AM, "Marta Tobe?a" <marta_mtm at hotmail.com> wrote:>Hi professors >I'm finding the best package in R for manage a big database about >vessels. I need to divided the travel of each boat into tracks. I have >GPS points. > >I would join these points in a line on the map. I make that with the >function "lines", but I can't divided by vessel or by track, > >I saw several packages, for tracking animals but they had specifically >variables. And I don't add others like "type","destination" or "status". > >Can you give me a suggestion, please > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at 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.