Learn R Programming

genio (version 1.0.9)

require_files_plink: Require that plink binary files are present

Description

This function checks that each of the plink binary files (BED/BIM/FAM extensions) are present, given the shared base file path, stopping with an informative message if any of the files is missing. This function aids troubleshooting, as various downstream external software report missing files differently and sometimes using confusing or obscure messages.

Usage

require_files_plink(file)

Arguments

file

The shared file path (excluding BED/BIM/FAM extensions).

Value

Nothing

Examples

Run this code
# NOT RUN {
# check that the samples we want exist
# start with bed file
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)
# remove extension
file <- sub('\\.bed$', '', file)
# since all sample.{bed,bim,fam} files exist, this will not stop with error messages:
require_files_plink(file)

# }

Run the code above in your browser using DataLab