Description Usage Arguments Value
View source: R/segmentedCells-class.R
Function to coerce a SegmentedCells object to a data frame.
1 2 | ## S3 method for class 'SegmentedCells'
as.data.frame(x, ...)
|
x |
A SegmentedCells object. |
... |
Other arguments. |
A data.frame
## Generate toy data set.seed(51773) x <- round(c(runif(200),runif(200)+1,runif(200)+2,runif(200)+3, runif(200)+3,runif(200)+2,runif(200)+1,runif(200)),4) y <- round(c(runif(200),runif(200)+1,runif(200)+2,runif(200)+3, runif(200),runif(200)+1,runif(200)+2,runif(200)+3),4) cellType <- factor(paste('c',rep(rep(c(1:2),rep(200,2)),4),sep = ”)) imageID <- rep(c('s1', 's2'),c(800,800)) cells <- data.frame(x, y, cellType, imageID)
## Store data in SegmentedCells object cellExp <- SegmentedCells(cells, cellTypeString = 'cellType')
## Generate LISA cellsDF <- as.data.frame(cellExp)
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.