group_assign: Assign individuals to groups based on 2-dimensional location...

Description Usage Arguments Examples

View source: R/group_assign.R

Description

This function clusters individuals into groups based on their locations and some mean group size.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
group_assign(
  data = data,
  id = "id",
  xcoord = "x",
  ycoord = "y",
  time = NULL,
  group_size = NULL,
  group_vector = NULL,
  method = c("hclust", "kmeans")
)

Arguments

data

list of simulation data generated by swap or UD method

id

individual identifier field

time

time step variable

group_size

average group size in results

group_vector

vector of group sizes per time step

method

grouping method, either kmeans or hierarchical clustering

xcoords

x coordinates

ycoords

y coordinates

Examples

1

vjf2/SocGen documentation built on April 24, 2021, 10:59 a.m.