# Converte to coordenate in radian
radian = function(coord, num = TRUE, rad = FALSE)
{
out = sapply(coord,
function(coord, num, rad)
{
## standardized in vector numerical
crd = coord_clean(coord)
signal = sign(crd[1])
crd = abs(crd)
if(length(crd) > 3) return("de 1 a 3")
if(rad) return(coord) else {
if(length(crd) == 1) out = signal * crd * (pi/180)
else if(length(crd) == 2) out = signal * (crd[1] + crd[2]/60) * (pi/180)
else if(length(crd) == 3) out = signal * (crd[1] + crd[2]/60 + crd[3]/3600) * (pi/180)
else stop("de 1 a 3")
}#end if
if(!num) out = paste(out, "rad")
return(out)
}, num = num, rad = rad #end function
)#end sapply
return(out)
}#end radian
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.