longLat <- rbind(
c(0,0),
#note the precision here!
c(0, 90),
c(-45,12)
)
# matrix-method
xyz <- PolToCar(longLat)
# numeric-method
xyz2 <- PolToCar(longLat[1,])
# data.frame method
xyz3 <- PolToCar(as.data.frame(longLat))
Run the code above in your browser using DataLab