No need for a function; you can just write the expression yourself:
> x <- read.table(textConnection(" 32 31.85
+ 59 48.74
+ 34 05.7
+ 58 50.79
+ 34 05.7
+ 58 50.79
+ 34 05.7
+ 58 50.79"))> closeAllConnections()
> x
V1 V2
1 32 31.85
2 59 48.74
3 34 5.70
4 58 50.79
5 34 5.70
6 58 50.79
7 34 5.70
8 58 50.79> # convert
> x$V1 + x$V2 / 60
[1] 32.53083 59.81233 34.09500 58.84650 34.09500 58.84650 34.09500
58.84650>
On Sat, Oct 9, 2010 at 2:49 PM, Mehdi Zarrei <gagzarrei at yahoo.com>
wrote:> Hello R-experts,
>
> I have some coordinates that look like this:
> lat?????????????????????????? long
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ? ? ? ? ? ? ? ? ? ? ? ?32 31.85
> ? ? ? ? ? ? ? ? ? ? ? ?59 48.74
>
>
> ? ? ? ? ? ? ? ? ? ? ? ? 34 05.7
> ? ? ? ? ? ? ? ? ? ? ? ?58 50.79
>
>
> ? ? ? ? ? ? ? ? ? ? ? ? 34 05.7
> ? ? ? ? ? ? ? ? ? ? ? ?58 50.79
>
>
> ? ? ? ? ? ? ? ? ? ? ? ? 34 05.7
> ? ? ? ? ? ? ? ? ? ? ? ?58 50.79
>
>
>
>
> This was my GPS setting by the time of filed trip. I assume that the second
column is "minute + seconds". Am i right? I am looking for a function
to convert them to decimal degree.
>
> Appreciate it if I get any help.
>
> All the best,
>
> Mehdi
>
>
>
>
>
>
> ? ? ? ?[[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.
>
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?