Save spatial weights to a file
save_weights(gda_w, id_variable, out_path, layer_name = "")
A Weight object
The id variable (a data.frame) that defines the unique value of each observation when saving a weights file
The path of an output weights file
(optional) The name of the layer of input dataset
A boolean value indicates if save successfully or failed
if (FALSE) {
library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
queen_w <- queen_weights(guerry)
save_weights(quen_w, guerry_df['CODE_DE'], out_path = '/path/Guerry_r.gal')
}