rename_iids: Rename all the within-family IDs within the data

View source: R/rename_iids.R

rename_iidsR Documentation

Rename all the within-family IDs within the data

Description

Rename all the within-family IDs within the data

Usage

rename_iids(data, iids)

Arguments

data

the data source, which can be:

  • PLINK text data, as created by create_plink_text_data.

  • PLINK binary data, as created by create_plink_bin_data.

  • PLINK2 binary data, as created by create_plink2_bin_data.

  • PLINK text filenames, as created by create_plink_text_filenames.

  • PLINK binary filenames, as created by create_plink_bin_filenames.

  • PLINK2 binary filenames, as created by create_plink2_bin_filenames.

  • data to be used by assoc, as created by create_assoc_data

  • data to be used by assoc_qt, as created by create_assoc_qt_data

iids

one or more within-family IDs, as can be checked by check_iids

Value

the data with renamed family IDs

Author(s)

Richèl J.C. Bilderbeek

Examples

# Use PLINK text data
data_before <- create_test_plink_text_data()
new_iids <- as.character(1 + data_before$ped_table$IID)
# the .ped table has the new iids
data_after <- rename_iids(
  data = data_before,
  iids = new_iids
)

# Use data used by plink::assoc_qt
data_before <- create_test_assoc_qt_data()
new_iids <- as.character(1 + data_before$data$ped_table$IID)
# the .ped and .phe tables have the new iids
data_after <- rename_iids(
  data = data_before,
  iids = new_iids
)

richelbilderbeek/plinkr documentation built on March 25, 2024, 3:18 p.m.