Test multiple K values
tess_ktest.Rd
Test multiple K values
Usage
tess_ktest(
gen,
coords,
Kvals = 1:10,
grid = NULL,
tess_method = "projected.ls",
lambda = 1,
K_selection = "manual",
ploidy = 2,
quiet = FALSE
)
Arguments
- gen
genotype dosage matrix (rows = individuals & columns = snps) or
vcfR
object- coords
coordinates of samples as sf points, a two-column matrix, or a data.frame representing x and y coordinates (see Details for important information about projections)
- Kvals
vector of K values to test
- grid
SpatRaster for kriging
- tess_method
the type of TESS method to be run ("projected.ls" for projected least squares algorithm (default) or "qp" for quadratic programming algorithm)
- lambda
numeric value for the spatial regularization parameter. The default value lambda = 1 attributes equal weights to the loss function and to the penalty function.
- K_selection
how to perform K selection ("manual" to enter into console (default) or "auto" for automatic selection based on bestK)
- ploidy
ploidy of data (defaults to 2)
- quiet
whether to operate quietly and suppress the output of tables and figures (defaults to FALSE)
See also
Other TESS functions:
allK_plot_helper()
,
bestK()
,
ggbarplot_helper()
,
krig_legend()
,
pops_helper()
,
tess_barplot()
,
tess_col_default()
,
tess_do_everything()
,
tess_ggbarplot()
,
tess_ggplot()
,
tess_krig()
,
tess_plot_allK()