covariance: Compute covariance matrix and vectorize.

Description Usage Arguments Value Examples

View source: R/covariance.R

Description

covariance computes the covariance matrix and vectorize it.

Usage

1
covariance(population, variables)

Arguments

population

tbl with grouping (metadata) and observation variables.

variables

character vector specifying observation variables.

Value

data frame of 1 row comprising vectorized covariance matrix.

Examples

1
2
3
4
5
6
7
8
9
population <- tibble::tibble(
  x = rnorm(30),
  y = rnorm(30),
  z = rnorm(30)
)

variables <- c("x", "y")

covariance(population, variables)

cytominer documentation built on July 8, 2020, 5:08 p.m.