In R, I want to create a random data frame of x
and y
coordinates, that has a certain degree of clustering. For example 15 $k$-means clusters.
I currently have this:
customer_locations <- data.frame(
id = 1:n,
x = round(runif(n) * grid_size),
y = round(runif(n) * grid_size)
)