Description Usage Arguments Value Examples

View source: R/get_mean_median.R

Takes the output of `correlate_windows`

and extract the mean and the median correlation value
for each window comparison.

1 | ```
get_mean_median(df, absolute_cc = TRUE)
``` |

`df` |
A data frame, usually the output of |

`absolute_cc` |
Should the function work of absolute value of correlation coefficients?
Default to |

A `data_frame`

with columns `bin`

, `window`

, `mean`

and `median`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
library(magrittr)
expMat <- matrix(
c(1, 1, 5,
1, 2, 3,
0, 1, 4,
0, 0, 2),
ncol = 3, byrow = TRUE, dimnames = list(paste("gene", 1:4), paste("cell", 1:3))
)
calculate_cvs(expMat) %>%
define_top_genes(window_size = 2) %>%
bin_scdata(window_number = 1) %>%
correlate_windows(n_random = 2) %>%
get_mean_median
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.