Learn R Programming

gwasrapidd (version 0.99.17)

is_rs_id: 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)

Value

Returns a logical vector of the same length as str,

TRUE for strings that are valid rs IDs, and FALSE otherwise.

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).