View source: R/helperfunctions.R
onePerCell | R Documentation |
onePerCell()
returns a dataframe with one table per cell, simplified especially for people who wish
to make their own plots (e.g. histograms, etc) based on the summarized cell data. Automatically, it groups
the input dataset by unique cell (cell & frame), but it is possible to use this function with other column names.Function to get a dataframe per cell out of your mesh, spots, object or tiff dataset.
onePerCell()
returns a dataframe with one table per cell, simplified especially for people who wish
to make their own plots (e.g. histograms, etc) based on the summarized cell data. Automatically, it groups
the input dataset by unique cell (cell & frame), but it is possible to use this function with other column names.
onePerCell(inputframe, by = c("cell", "frame"))
inputframe |
the dataset (in form of a dataframe) to be summarized |
by |
the grouping value. default = c("cell", "frame") |
the function will return a dataframe (tibble) with the data summarized by the grouping value by
.
it will do this by returning the common values per cell (mean intensity, etc), removing values that are useless
in one-column context (x/y coordinates of outlines), and calculating the mean, median and standard deviation of
numerical values it doesn't recognize. if there are character values with different values per grouped variable,
the function will take ONLY THE FIRST VARIABLE.
## Not run:
df <- data.frame("cell"= c(rep(1, 5), rep(2,5)), "frame"=rep(1, 10), "channel"="GFP", "intensity"=c(1,3,4,5,6,1,2,7,3,10))
onePerCell(df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.