
SegLocalEnv
.## S3 method for class 'SegLocalEnv':
update(object, coords, data, env, proj4string, \dots)
LocalEnv
to be updated.matrix
containing coordinates of the data points (each row is a point).matrix
containing the population of each group at each data point. The number of rows in matrix
containing the local environment parameters. Must be the same dimensions as CRS
.SegLocalEnv
.SegLocalEnv
, getSegLocalEnv
, SegLocalEnv-class
# 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