I am a new user of R and I have a project where some coordinates are provided in British National Grid coordinates. These are not recognised by our preferred mapping program, so I would prefer to convert to lat/long. I have found some resources on how to do this using the code below:
require("rgdal") || install.packages("rgdal")
require("sp") || install.packages("sp")
library(rgdal)
# prepare UTM coordinates matrix
utmcoor<-SpatialPoints(cbind(knime.in$"Easting",knime.in$"Northing"), proj4string=CRS("+proj=utm +zone=30"))
#utmdata$X and utmdata$Y are corresponding to UTM Easting and Northing, respectively.
#zone= UTM zone
# converting
longlatcoor<-spTransform(utmcoor,CRS("+proj=longlat"))
However, the results are not what I was expecting. I tried an Easting/Northing for somewhere in Greenwich as an example and the point eventually mapped was somewhere off the Ivory Coast! I don't think UTM here is the correct system to specify, but I do not know how to specify BNG. I don't think I'm too far off solving the problem, but I could do with a bit of assistance. Thank you!
Example: Tried the above code with East./North. 537869 , 178976. Was expecting 51.492927 , -0.015449524, but got the result -2.6595478348955846, 1.6192189249637292 instead.