# Create a random data set with 50 data points and 3 population groups
xy <- matrix(runif(100), ncol = 2)
pop <- matrix(runif(150), ncol = 3)
localenv <- SegLocalEnv(coords = xy, data = pop)
print(localenv)
# Update the projection information
proj <- CRS("+proj=nzmg +datum=nzgd49")
localenv2 <- update(localenv, proj4string = proj)
print(localenv2)
Run the code above in your browser using DataLab