Description Usage Arguments Examples
Function to calculate the column-wise medians of a matrix of data frame (like a somewhat-simplified median analog to colMeans). Useful for calculating posterior medians in Bayesian statistics.
1 | colMedians(colMedians.object, na.rm = FALSE)
|
colMedians.object |
Object for which we wish to calculate column medians |
na.rm |
Should NAs be excluded? Defaults to FALSE |
1 2 3 4 5 6 | ## Compute medians for a matrix
my.matrix = matrix(1:15,3,5)
colMedians(my.matrix)
## Computer medians for a data frame
my.df = as.data.frame(my.matrix)
colMedians(my.df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.