Learn R Programming

gap (version 1.6)

snptest_sample: A utility to generate SNPTEST sample file

Description

A utility to generate SNPTEST sample file

Usage

snptest_sample(
  data,
  sample_file = "snptest.sample",
  ID_1 = "ID_1",
  ID_2 = "ID_2",
  missing = "missing",
  C = NULL,
  D = NULL,
  P = NULL
)

Value

Output file in SNPTEST's sample format.

Arguments

data

Data to be used.

sample_file

Output filename.

ID_1

ID_1 as in the sample file.

ID_2

ID_2 as in the sample file.

missing

Missing data column.

C

Continuous variables.

D

Discrete variables.

P

Phenotypic variables.

Examples

Run this code
if (FALSE) {
d <- data.frame(ID_1=1,ID_2=1,missing=0,PC1=1,PC2=2,D1=1,P1=10)
snptest_sample(d,C=paste0("PC",1:2),D=paste0("D",1:1),P=paste0("P",1:1))
}

Run the code above in your browser using DataLab