tests/testthat/test-phenotypes.R

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

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

	df <- suppressMessages(phenotypes(userid='1,6,8', df=TRUE))

	expect_that(df, is_a("list"))
	expect_that(df[[1]], is_a("data.frame"))
	expect_equal(
		as.character(suppressMessages(phenotypes(userid=1))$user$name),
		"Bastian Greshake Tzovaras"
	)
})

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.