I see my pre-coffee fingering hit an incorrect key in the final
line--"E" is positive, "W" is negative.
--
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Quality Modeler INTERNET: cl...@math.utah.edu
Department of Ecology VOICE: (360) 40
The following (untested) should get you close:
deg<-as.integer(strsplit(coords, "?")[[1]][1])
min<-as.integer(strsplit(strsplit(coords, "?")[[1]][2],
"'")[[1]][1])
sec<-as.numeric(strsplit(strsplit(strsplit(coords, "?")[[1]][2],
"'")[[1]][2], "\"")[[1]][1])
nswe<-strsplit(strsplit(strsplit(coor
Dear all, I have the following written example
> coords <- "51°30'48.58\"N"
>
> as.integer(strsplit(coords, "°")[[1]][1])
[1] 51
> as.integer(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][1])
[1] 30
> as.numeric(strsplit(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][2],
> "\"")[[1]][1]
3 matches
Mail list logo