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]) [1] 48.58 > strsplit(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][2], "\"")[[1]][2] [1] "N"
My code gets from the coords degrees , minutes, seconds and finally the N/S/W/E Could you please tell me if there is any function in R that can convert all the above into fractions of degrees (single numerical value). B.R Alex [[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.