Skip to contents

Summarises a parameter in the provided data frame by computing its mean and standard deviation. It first validates that the specified column exists in the data frame.

Usage

summarise_parameter(df, param_name)

Arguments

df

A data frame object.

param_name

Character. The name of the column to summarise.

Value

A list with the following elements:

  • param_name: The name of the parameter.

  • mean: The computed mean of the parameter.

  • sd: The computed standard deviation of the parameter.

Examples

if (FALSE) { # \dontrun{
  df <- data.frame(a = rnorm(100))
  summarise_parameter(df, "a")
} # }