is_rs_id: Is a string a valid rsID?

View source: R/parse-utils.R

is_rs_idR Documentation

Is a string a valid rsID?

Description

Find which strings are valid SNP reference IDs, i.e., of the form rs[0-9]+. Please note that this only does a syntax validation on the strings. It does not check whether the actual IDs exist in dbSNP.

Usage

is_rs_id(str, convert_NA_to_FALSE = TRUE)

Arguments

str

A character vector of putative SNP reference IDs of the form rs[0-9]+.

convert_NA_to_FALSE

Whether to preserve NA (convert_NA_to_FALSE = TRUE) or whether to return FALSE when an NA is found (convert_NA_to_FALSE = FALSE).

Value

Returns a logical vector of the same length as str, TRUE for strings that are valid rs IDs, and FALSE otherwise.


gwasrapidd documentation built on May 29, 2024, 4:31 a.m.