powered by
Creates the adjacency matrix for the supplied counties within the United States using the available neighborhood information
get_adj_mat(county.adjacency,Countyvec,Statevec)
the corresponding adjacency matrix
data frame containing the neighborhood information for the counties of the entire US
character vector containing the names of the counties for which the adjacency matrix is to be computed
character vector containing the names of the states the supplied counties belong to
data(county.adjacency) data(USAcities) IAcities <- subset(USAcities,state_id=="IA") countyname <- unique(IAcities$county_name) A <- get_adj_mat(county.adjacency,countyname,c("IA"))
Run the code above in your browser using DataLab