Hi,



I'm a beginner on R, and I have a shapefile with the coordinates WGS84 UTM
19, Hemisphere South. The EPGS code is: 32719.



And when I plot the map (density estimation), it shows a some strange
scale. Plus, I'd like on the x and y axes. It shows the UTM scale.



So, my problem is how to set the reference system.



I have the next code:



library(graphics)

library(rgdal)

library(shapefiles)

library(maptools)

library(sp)

library(spatstat)



setwd("C:/Users/Administrador/Desktop/ppp ejemplo")



UTM19S <- "+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m
+no_defs +towgs84=0,0,0"

S <- readShapePoints("ejem.shp", proj4string = CRS(UTM19S))

SP <- as(S, "SpatialPoints")

P <- as(SP, "ppp") #read and transform shape

summary(SP)

r <- bw.diggle(P)

plot(Kest(P))

plot(envelope(P,Kest, nsim = 100))



plot(density(P, r), col = heat.colors(12)[12:1],

main = "", xlab = "Easting", ylab = "Northing", aspect = 1:2)





rm(list=ls())



Regards,



Ariel Fuentes

	[[alternative HTML version deleted]]

