column_dictionary: Map column names to positions.

View source: R/column_dictionary.R

column_dictionaryR Documentation

Map column names to positions.

Description

Useful in situations where you need to specify columns by index instead of name (e.g. awk queries).

Usage

column_dictionary(file_path)

Arguments

file_path

Path to full summary stats file (or any really file you want to make a column dictionary for).

Value

Named list of column positions.

Source

Borrowed function from echotabix.

eduAttainOkbayPth <- system.file("extdata", "eduAttainOkbay.txt", package = "MungeSumstats" ) tmp <- tempfile(fileext = ".tsv") file.copy(eduAttainOkbayPth, tmp) cdict <- MungeSumstats:::column_dictionary(file_path = tmp)


neurogenomics/MungeSumstats documentation built on May 2, 2024, 9:04 a.m.