Learn R Programming

sfdep (version 0.2.5)

st_complete_nb: Create Neighbors as Complete Graph

Description

Create a neighbors list where every element is related to every other element. This creates a complete graph.

Usage

st_complete_nb(n_elements, diag = FALSE)

Value

A neighbors list representing a complete graph.

Arguments

n_elements

the number of observations to create a neighbors list for

diag

default FALSE. If TRUE, includes diagonal element / the self.

Examples

Run this code
st_complete_nb(5)

Run the code above in your browser using DataLab