add_metadata: Add meta data to extracted data

View source: R/add_metadata.r

add_metadataR Documentation

Add meta data to extracted data

Description

Previously the meta data was returned alongside association information. This is mostly unnecessary as it is needlessly repeating information. This is a convenience function that reinstates that information. Can be applied to either exposure data, outcome data, or harmonised data

Usage

add_metadata(dat, cols = c("sample_size", "ncase", "ncontrol", "unit", "sd"))

Arguments

dat

Either exposure data, outcome data or harmonised data

cols

Which metadata fields to add. Default = c("sample_size", "ncase", "ncontrol", "unit", "sd")

Value

Data frame


MRCIEU/TwoSampleMR documentation built on Sept. 28, 2024, 6:51 p.m.