readIID | R Documentation |
Generate individual ID automatically, or based on a fam file.
readIID(fam, opt = NULL)
fam |
prefix or name of a PLINK file, or data fram from a FAM file. |
opt |
option (def=1: the 2nd column in FAM file). |
The option (opt
) can be:
1 = the iid column in FAM (default),
2 = formated as fid.iid,
0 = nothing
-1 = numbering of individuals, decimal
-2 = numbering of individuals, zero-padded fix-length decimal
-3 = numbering of individuals, zero-padded fix-length hexedemical or, a vector of IDs to use.
a vector of individual ID
pfx <- file.path(system.file("extdata", package="plinkFile"), "m20")
readIID(pfx, 1) # opt= 1: IID
readIID(pfx, 2) # opt= 2: FID.IID
readIID(pfx, -1) # opt=-1: number sequence
readIID(pfx, -2) # opt=-2: number sequence, fixed length, decimal
readIID(pfx, -3) # opt=-3: number sequence, fixed length, hexidemical
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.