Description Usage Arguments Value Examples
Check that input is a vector of strings that look like rsids
1 | assert_probabilities(data, on_error = on_error_options)
|
data |
a dataframe that has a column rsid which will be validated |
on_error |
if data does _not_ validate, whether to show the reasons and whether to throw: all: show all the problems and throw an exception none: don't show anything, but throw an exception summary: show a summary and throw an exception tell: just return TRUE if OK and FALSE if invalid |
TRUE if data is valid and FALSE if invalid (only when "on_error" == "tell")
1 2 3 4 5 6 | assert_rsids(data.frame(rsid=c("rs001101","rs00042"))) # TRUE
assert_rsids(data.frame(rsid=c("rs001101"))) # TRUE
assert_rsids(data.frame(rsid="rs001101")) # TRUE
assert_rsids(data.frame(rsid=c("001101","rs00042")),on_error="tell") ## FALSE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.