% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/patch_sim.R
\name{simulate_raster_patch}
\alias{simulate_raster_patch}
\title{Function to simulate tagged patch values in a single layer spatraster.}
\usage{
simulate_raster_patch(
  original_raster,
  transition_matrix,
  non_trans = 0,
  iterations = 10
)
}
\arguments{
\item{original_raster}{The SpatRaster object representing the categorical data.}

\item{transition_matrix}{Transition matrix values that define transitions
based on class values.}

\item{non_trans}{Class(es) that the user would like to remain unsimulated.
Defualt is class 0 since this is the background class.}

\item{iterations}{The number of simulations to be performed.}
}
\value{
A SpatRaster where the patches values have been simulated.
}
\description{
Function to simulate tagged patch values in a single layer spatraster.
}
\examples{
library(terra)

r <- rast(nrows = 20, ncols = 20)
values(r) <- rep(1:3, length.out = ncell(r))

trans_mat <- matrix(1/3, 3, 3)
rownames(trans_mat) <- colnames(trans_mat) <- c("1", "2", "3")

simulate_raster_patch(r, trans_mat, iterations = 1)
}
