inst/tests/test_link.r

context("elink")
test_that("The record-linking funcitons work",{
    #setup
    elinks <- entrez_link(dbfrom = "pubmed", id = 20674752, db = "all")
    #tests
    expect_that(elinks, is_a("elink"))
    expect_that(names(elinks), is_a("character"))
    expect_that(elinks$file, is_a("XMLInternalDocument"))
    expect_true(length(elinks$pubmed_nuccore) > 0)
})

Try the rentrez package in your browser

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

rentrez documentation built on May 2, 2019, 6:12 p.m.