Last data update: 2014.03.03
|
R: Optimal Allocation of Coordinates to a grid
optimal_grid_allocation | R Documentation |
Optimal Allocation of Coordinates to a grid
Description
optimal_grid_allocation() ... newGeoTable .
Usage
optimal_grid_allocation(data, grid.cols=NULL, grid.rows=NULL, addGrid=0, plot=FALSE)
Arguments
data |
data frame with first column X-coordinate and second column Y-coordinate
|
grid.cols |
number of columns in the grid
|
grid.rows |
number of rows in the grid
|
addGrid |
additional columns and rows in the grid
|
plot |
TRUE/FALSE for plotting the allocation
|
Author(s)
Alexander Kowarik, Statistics Austria
See Also
export
Examples
data <- data.frame(x=c(0,2,1.24,2,1.98,1.62,1.24,1.91,0.48),
y=c(2.93,2.45,1.94,1.46,0.98,3,0.70,0.56,0))
rownames(data) <- c("IS","FI","NO","EE","LV","SE","DK","LT","IE")
index <- optimal_grid_allocation(data,plot=TRUE)
index2 <- optimal_grid_allocation(data,grid.cols=3,grid.rows=4,plot=TRUE)
Results
|