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 wrote:
> Dear R users,
>
> I have huge dataset lik
Hello Jim,
Thanks. It works. Great.
By the way, I am beginner in R.
All the best,
Mehdi
--- On Wed, 10/6/10, jim holtman wrote:
From: jim holtman
Subject: Re: [R] Help to trafnsform data!
To: "Mehdi Zarrei"
Cc: r-help@r-project.org
Date: Wednesday, October 6, 2010, 2:37 PM
try this:
> input <- read.table(textConnection("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"), sep = "+", as.is = TRUE)
> closeAllConnections()
> result <- NULL
> for (i in 1:2
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, seco
4 matches
Mail list logo