correlation: Create a correlation object

View source: R/correlations.R

correlationR Documentation

Create a correlation object

Description

A helper function to create a correlation object

Usage

correlation(x, y, rho, ...)

Arguments

x

The name of the first variable

y

The name of the second variable

rho

The correlation between the two variables

...

Additional arguments to specify data frame names and factor names See details for more information on the additional arguments.

Details

This function is a helper function to create a correlation object that can be used to specify correlations between variables when synthesising data using the synthesise_data function. Additional Arguments:

  • df_name: The name of the data frame containing both variables

  • df_name.x: The name of the data frame containing the first variable

  • df_name.y: The name of the data frame containing the second variable

  • factor_name.x: The name of the factor variable for the first variable

  • factor_name.y: The name of the factor variable for the second variable

Value

A list containing the correlation information

Examples

 correlation("age", "bmi", 0.5)

RESIDE documentation built on Oct. 1, 2026, 1:07 a.m.