Skip to content
Prev 42624 / 398506 Next

degree-min-sec data

George_Heine at blm.gov writes:
Not necessarily. I might try something like

z <- strsplit(ifelse(is.na(y),y,"::NA"))
..etc..


There are also fancier possibilities:

z <- scan(textConnection(y),sep=":",fill=TRUE,what=list(a=0,b=0,c=0))
x <- z$a + z$b/60 + z$c/3600

or even

x <- with(z, a + b/60 + c/3600)
?? Was that what you intended to write?
list(c("aaa", "bbb"), c("ccc", "ddd"), "eee", "fff")