% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prep_conf_mat.R
\name{get_trans_mat}
\alias{get_trans_mat}
\title{Function to format the confusion matrices as transition matrices}
\usage{
get_trans_mat(df_list, categories)
}
\arguments{
\item{df_list}{A single data frame or a list of lists of data frames extracted using get_mat_data().
If a list, each sublist should contain two or more data frames to be summed.}

\item{categories}{A list of categories defining the numbers between 1 and 256.}
}
\value{
A list of data frames where row names represent pixels that will
transition and column names represent the class they will transition to.
}
\description{
Function to format the confusion matrices as transition matrices
}
\examples{
# make the data frame
bl_mat_data <- get_mat_data(c("UT"))

# List of categories with their corresponding vectors
# Define the values that represent our classes of interest
non_ag <- c(61:65, 81:83, 87:88, 92, 111:112, 121:124, 131, 141:143, 152, 176, 181, 190, 195)
alfalfa <- c(36:37)
major_ag <- c(1, 2, 5, 12, 13, 22:24, 26, 225:226, 228, 234, 236, 238:241, 254)
all_numbers <- 1:256
ag <- setdiff(all_numbers, c(non_ag, alfalfa, major_ag))

cat_5 <- list(non_ag = non_ag, ag = ag, alfalfa = alfalfa, major_ag = major_ag)

# get the confusion matrix for just 2008
trans_mat_5 <- get_trans_mat(bl_mat_data, cat_5)
}
