SkillAgentSearch skills...

Plink2R

Read PLINK BED/BIM/FAM files into R

Install / Use

/learn @gabraham/Plink2R
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

plink2R

plink2R natively reads PLINK (http://pngu.mgh.harvard.edu/~purcell/plink) BED/BIM/FAM files into R.

Missing genotypes are imputed by assigning missing values the per-SNP average.

Depends on Rcpp, RcppEigen

Example:

library(plink2R)
dat <- read_plink("data")
dim(dat$bed)
dim(dat$fam)
dim(dat$bim)

Also see the file plink2.R for an example.

If there are missing genotypes, these will by default be assigned as NA. To do simple imputation of missing genotypes (for each SNP, randomly assigning to the missing genotypes values sampled proportionally to the non-missing genotypes in the SNP), use read_plink("data", impute="random").

View on GitHub
GitHub Stars45
CategoryDevelopment
Updated2mo ago
Forks33

Languages

C++

Security Score

75/100

Audited on Feb 9, 2026

No findings