tests/testthat/test-phenotypes_byid.R

# tests for phenotypes_byid fxn in ropensnp
context("phenotypes_byid")

test_that("phenotypes_byid returns the correct class", {
	skip_on_cran()

	one <- suppressMessages(phenotypes_byid(phenotypeid=12, return_ = 'users'))

	expect_is(one, "data.frame")
	expect_is(suppressMessages(phenotypes_byid(phenotypeid=12, return_ = 'desc')),
		"list")
	expect_equal(NCOL(one), 2)
	expect_equal(
		suppressMessages(
			phenotypes_byid(
				phenotypeid=12, return_ = 'knownvars'))$known_variations[1:2],
							list("Red","Blonde"))
})

Try the rsnps package in your browser

Any scripts or data that you put into this service are public.

rsnps documentation built on Jan. 28, 2022, 5:07 p.m.