save_weights {rgeoda} | R Documentation |
Save Spatial Weights
Description
Save spatial weights to a file
Usage
save_weights(gda_w, id_variable, out_path, layer_name = "")
Arguments
gda_w |
A Weight object |
id_variable |
The id variable (a data.frame) that defines the unique value of each observation when saving a weights file |
out_path |
The path of an output weights file |
layer_name |
(optional) The name of the layer of input dataset |
Value
A boolean value indicates if save successfully or failed
Examples
## Not run:
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')
## End(Not run)
[Package rgeoda version 0.0.10-4 Index]