findNN {ISAT} | R Documentation |
Find the nearest neighbour (NN) given a cell and a group of cells;
Description
Find the nearest neighbour (NN) given a cell and a group of cells;
Usage
findNN(cell, cellList, XY_LABELS = c("Cell.X.Position",
"Cell.Y.Position"))
Arguments
cell |
An object cell |
cellList |
A list of cell types to be calculated for |
XY_LABELS |
x and y positions of the cell |
Value
The Nearest Neibour Cell distance and calculate the distance
Examples
Cell.X.Position=sample (1:100,1)
Cell.Y.Position=sample (1:100,1)
Tcell=data.frame(Cell.X.Position,Cell.Y.Position)
Cell.X.Position=sample(1:500,5,replace=TRUE)
Cell.Y.Position=sample(1:500,5,replace=TRUE)
Tumor.cells=data.frame(Cell.X.Position,Cell.Y.Position)
findNN(Tcell,Tumor.cells,XY_LABELS=c('Cell.X.Position', 'Cell.Y.Position'))
[Package ISAT version 1.0.5 Index]