[R-sig-Geo] converting latlong in decimal degrees to utm

moses selebatso selebatsom at yahoo.co.uk
Sat Jul 18 17:27:02 CEST 2015


I am trying to get my data (sample below) to utm before I can use it for Kernel Density Estimates. Can someone help?
> data<-read.csv("clipboard",sep="\t")
> head(data)
          x        y
1 -21.76580 23.20185
2 -21.76692 23.20126
3 -21.76690 23.20127
4 -21.76761 23.20338
5 -21.77223 23.20354
6 -21.77193 23.20327
> proj4string(data) <- CRS("+proj=utm +zone=34 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs")
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘proj4string<-’ for signature ‘"data.frame", "CRS"’
Thank you, in advance. Moses SELEBATSO

(+267) 318 5219 (H) (+267) 716 393 70 (C)
  (+267) 738 393 70 (C
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list