Learn R Programming

cytominer (version 0.2.2)

covariance: Compute covariance matrix and vectorize.

Description

covariance computes the covariance matrix and vectorize it.

Usage

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

Run this code
# NOT RUN {
population <- tibble::tibble(
  x = rnorm(30),
  y = rnorm(30),
  z = rnorm(30)
)

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

covariance(population, variables)
# }

Run the code above in your browser using DataLab