dixons_s {spatialTIME} | R Documentation |
Dixon's S Segregation Statistic
Description
This function processes the spatial files in the mif object, requiring a column that distinguishes between different groups i.e. tumor and stroma
Usage
dixons_s(
mif,
mnames,
num_permutations = 1000,
type = c("Z", "C"),
workers = 1,
overwrite = FALSE,
xloc = NULL,
yloc = NULL
)
Arguments
mif |
An MIF object |
mnames |
vector of markers corresponding to spatial columns to check Dixon's S between |
num_permutations |
Numeric value indicating the number of permutations used. Default is 1000. |
type |
a character string for the type that is wanted in the output which can be "Z" for z-statistic results or "C" for Chi-squared statistic results |
workers |
Integer value for the number of workers to spawn |
overwrite |
Logical value determining if you want the results to replace the current output (TRUE) or be to be appended (FALSE). |
xloc |
a string corresponding to the x coordinates. If null the average of XMin and XMax will be used |
yloc |
a string corresponding to the y coordinates. If null the average of YMin and YMax will be used |
Value
Returns a data frame for Z-statistic
From |
|
To |
|
Obs.Count |
|
Exp. Count |
|
S |
|
Z |
|
p-val.Z |
|
p-val.Nobs |
|
Marker |
|
Classifier Labeled Column Counts |
|
Image.Tag |
Returns a data frame for C-statistic
Segregation |
|
df |
|
Chi-sq |
|
P.asymp |
|
P.rand |
|
Marker |
|
Classifier Labeled Column Counts |
|
Image.Tag |
Examples
#' #Create mif object
library(dplyr)
x <- create_mif(clinical_data = example_clinical %>%
mutate(deidentified_id = as.character(deidentified_id)),
sample_data = example_summary %>%
mutate(deidentified_id = as.character(deidentified_id)),
spatial_list = example_spatial,
patient_id = "deidentified_id",
sample_id = "deidentified_sample")