Another way: library(gsubfn) sapply(lapply(lapply(input, strapply, pattern = "\\d{2}", ~as.numeric(x), simplify = rbind), sweep, MARGIN = 2, STATS = c(1, 60, 3600), '/'), rowSums)
On Wed, Oct 6, 2010 at 2:51 PM, Mehdi Zarrei <gagzar...@yahoo.com> wrote: > Dear R users, > > I have huge dataset like the bellow (prepared in notepad in txt format: > > 31;39;00N+65;40;00E T > 36;31;42N+69;04;21E T > 34;10;00N+69;41;00E T > 34;34;00N+69;06;00E T > 31;40;00N+65;44;00E T > 35;00;00N+69;07;00E T > 34;00;00N+69;53;00E T > > These are geographical coordinates, degree minute, seconds. > latitude longitude > 31;39;00N+65;40;00E T > > I would like to plot them on the map. I would like to know to how separate > longitude and longitude from each other and put them into two different > columns and then transform the degree minute second into decimal format. > > Your help very appreciated. > > Mehdi > > > > > > > > [[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. > > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[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.