snptest_sample: A utility to generate SNPTEST sample file

View source: R/snptest_sample.R

snptest_sampleR Documentation

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
)

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.

Value

Output file in SNPTEST's sample format.

Examples

## Not run: 
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))

## End(Not run)

gap documentation built on Aug. 26, 2023, 5:07 p.m.