filter_save | R Documentation |
This function saves a matrix with weights (filter or kernel matrix) in an external text file.
It can save either the raw matrix
or use the standards for running r.mfilter
within GRASS GIS
(with specific header and details).
filter_save(
filt,
radius,
type,
save_format = c("GRASS_rmfilter", "raw")[1],
save_folder = NULL,
save_file = NULL,
divisor = 1,
normalize = FALSE,
parallel = TRUE,
separator = " "
)
filt |
|
radius |
|
type |
|
save_format |
|
save_folder |
|
save_file |
|
divisor |
|
normalize |
|
parallel |
|
separator |
|
If used in the r.mfilter
GRASS GIS module, "The filter process produces a new category value
for each cell in the input raster map layer by multiplying the category values of the cells in the n x n
neighborhood around the center cell by the corresponding matrix value and adding them together.
If a divisor is specified, the sum is divided by this divisor." See details
here.
None. The funcion only saves the input matrix as an external file.
GRASS module r.mfilter
my_filter <- filter_create(r = 100, type = "bartlett", radius = 1000, round = 4)
filter_save(my_filter, radius = 1000, type = "bartlett", save_format = "GRASS_rmfilter")
filter_save(my_filter, radius = 1000, type = "bartlett", save_format = "raw")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.