mc_detect_layout {metaconfoundr}R Documentation

Tidy metaconfoundr data layouts

Description

mc_longer() and mc_wider() are helper functions to put metaconfoundr() for long and wide data sets, respectively. results into a tidy format. mc_detect_layout() chooses between the two automatically based on the number of variables in the data frame. mc_study_values() helps standardize evaluations of control quality.

Usage

mc_detect_layout(...)

mc_longer(
  study = contains("construct"),
  construct = contains("construct"),
  variable = matches("variable|factor"),
  control_quality = contains("control_quality"),
  is_confounder = contains("confounder"),
  study_values = mc_study_values()
)

mc_study_values(inadequate = 0, some_concerns = 1, adequate = 2)

mc_wider(
  construct = contains("construct"),
  variable = matches("variable|factor"),
  is_confounder = contains("confounder"),
  study = everything(),
  study_values = mc_study_values()
)

Arguments

...

Additional arguments passed to mc_wider() or mc_longer()

study

The column with the name of the studies

construct

The domain or construct column

variable

The column that describes the confounding variables

control_quality

The column that describes the confounding control quality

is_confounder

The column that describes if a variable is a confounder

study_values

What are the levels of control_quality? Use mc_study_values() to set up.

inadequate

Which value signifies inadequate control?

some_concerns

Which value signifies control with some concerns?

adequate

Which value signifies adequate control?

Value

a function that tidies the data


[Package metaconfoundr version 0.1.2 Index]