View source: R/calculate_cross_functions.R
calculate_cross_functions | R Documentation |
Compute and plot the cross functions between two specified cell types. This function implements the cross functions from [spatstat] package.
calculate_cross_functions(
spe_object,
method = "Kcross",
cell_types_of_interest,
feature_colname,
plot_results = TRUE,
dist = NULL
)
spe_object |
SpatialExperiment object in the form of the output of
|
method |
String that is the method for dependence calculation. Options: "Gcross", "Kcross", "Kcross.inhom", "Lcross", "Jcross". Default method is "Kcross". |
cell_types_of_interest |
String Vector. Cell types of interest. |
feature_colname |
String that is the name of the column of the types. |
plot_results |
Boolean. TRUE if result to be plotted, FALSE if not. In either case, an object with the results is returned |
dist |
Number (OPTIONAL) The largest distance between two cell types at which K function is evaluated. If NULL, use the default distances set by cross functions. |
An object of class "fv" defined in 'spatstat' package.
df_cross <- calculate_cross_functions(SPIAT::defined_image,
method = "Kcross", cell_types_of_interest = c("Tumour","Immune3"),
feature_colname ="Cell.Type", dist = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.