Re: [R] syntax for reading into R
we haven't had time to create the file again, yet, but thanx also for the great tip about this special mailing list! marion 2012/1/3 Barry Rowlingson > On Tue, Jan 3, 2012 at 10:54 AM, Marion Wenty > wrote: > > hello barry, > > > > thank you very much for your help! > > > > we managed to do what you said and it basicaly worked - there only is a > > problem with our file, but we will create the file again and then it > should > > work completely. i will keep you posted how it turned out. thanks again! > > Great - you might get more help from the R-sig-geo mailing list, > where we tend to talk about spatial data a bit more than on R-help! > > Barry > [[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] syntax for reading into R
hello barry, thank you very much for your help! we managed to do what you said and it basicaly worked - there only is a problem with our file, but we will create the file again and then it should work completely. i will keep you posted how it turned out. thanks again! marion 2012/1/2 Barry Rowlingson > On Mon, Jan 2, 2012 at 3:54 PM, Barry Rowlingson > wrote: > > > That looks suspiciously like a chunk of a GPX format file - GPS > > tracks, that kind of thing. Am I right? > > > > If so, then get the rgdal package, and read it in. You'll end up with > > a spatial data frame of some kind from which you can get the points > > and times. > > > > http://en.wikipedia.org/wiki/GPS_eXchange_Format > > Specifically, if I put that snippet of yours into a GPX file, I can do: > > > trk= readOGR("m.gpx","track_points") > > > trk > coordinates track_fid track_seg_id track_seg_point_id ele > 1 (16.343, 48.272) 00 0 387 > 2 (16.3436, 48.2719) 00 1 381 >time magvar geoidheight name cmt desc src link1_href > 1 2012/01/01 15:32:03+00 NA NA > 2 2012/01/01 15:32:34+00 NA NA > link1_text link1_type link2_href link2_text link2_type sym type fix sat > 1 9 > 2 9 > hdop vdop pdop ageofdgpsdata dgpsid > 1 NA NA NANA NA > 2 NA NA NANA NA > > - obviously there's a lot of stuff there you don't need, so you can do: > > > trk@data=trk@data[,c("ele","time","sat")] > > trk > coordinates ele time sat > 1 (16.343, 48.272) 387 2012/01/01 15:32:03+00 9 > 2 (16.3436, 48.2719) 381 2012/01/01 15:32:34+00 9 > > Barry > [[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] syntax for reading into R
On Mon, Jan 2, 2012 at 3:54 PM, Barry Rowlingson wrote: > That looks suspiciously like a chunk of a GPX format file - GPS > tracks, that kind of thing. Am I right? > > If so, then get the rgdal package, and read it in. You'll end up with > a spatial data frame of some kind from which you can get the points > and times. > > http://en.wikipedia.org/wiki/GPS_eXchange_Format Specifically, if I put that snippet of yours into a GPX file, I can do: > trk= readOGR("m.gpx","track_points") > trk coordinates track_fid track_seg_id track_seg_point_id ele 1 (16.343, 48.272) 00 0 387 2 (16.3436, 48.2719) 00 1 381 time magvar geoidheight name cmt desc src link1_href 1 2012/01/01 15:32:03+00 NA NA 2 2012/01/01 15:32:34+00 NA NA link1_text link1_type link2_href link2_text link2_type sym type fix sat 1 9 2 9 hdop vdop pdop ageofdgpsdata dgpsid 1 NA NA NANA NA 2 NA NA NANA NA - obviously there's a lot of stuff there you don't need, so you can do: > trk@data=trk@data[,c("ele","time","sat")] > trk coordinates ele time sat 1 (16.343, 48.272) 387 2012/01/01 15:32:03+00 9 2 (16.3436, 48.2719) 381 2012/01/01 15:32:34+00 9 Barry __ 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] syntax for reading into R
On Mon, Jan 2, 2012 at 3:31 PM, Marion Wenty wrote: . > > 387 > 2012-01-01T15:32:03Z > 9 > > > 381 > 2012-01-01T15:32:34Z > 9 > > ... > > now we would like to create a text file looking like the following, in > order to being able to read it into R afterwards. > > -> > > lat;lon;ele;time;sat > 48.272000;16.342984;387;2012-01-01T15:32:03Z;9 > 48.271909;16.343563;381;2012-01-01T15:32:34Z;9 > ... > > does anyone know how to do this? That looks suspiciously like a chunk of a GPX format file - GPS tracks, that kind of thing. Am I right? If so, then get the rgdal package, and read it in. You'll end up with a spatial data frame of some kind from which you can get the points and times. http://en.wikipedia.org/wiki/GPS_eXchange_Format Barry __ 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] syntax for reading into R
dear users, we have got the following question: we have got a text-file looking like this: ... 387 2012-01-01T15:32:03Z 9 381 2012-01-01T15:32:34Z 9 ... now we would like to create a text file looking like the following, in order to being able to read it into R afterwards. -> lat;lon;ele;time;sat 48.272000;16.342984;387;2012-01-01T15:32:03Z;9 48.271909;16.343563;381;2012-01-01T15:32:34Z;9 ... does anyone know how to do this? thank you very much for your help in advance. marion [[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.