define_cells {TroublemakeR} | R Documentation |
Define Cells
Description
This function takes a Raster object and identifies non NA cells and writes them to a .dat file. The file
will be written to the location specified by the name
argument. If the file
already exists, it will be overwritten. The file format is plain text, with each
line terminated by a newline character.
Usage
define_cells(Rasterdomain, name = "Problem")
Arguments
Rasterdomain |
A Raster object with any value in the cells that are part of the problem and NA values where the problem is not to be solved |
name |
The name of the output file |
Value
.dat file. This function is used for the side-effect of writing values to a file.
Author(s)
Derek Corcoran
Examples
data(Species)
library(terra)
Test <- Species[[1]] |>
terra::unwrap()
# Generate the "Problem.dat" file
define_cells(Test[[1]])
file.remove("Problem.dat")
[Package TroublemakeR version 0.0.1 Index]