tests/testthat/test-literature_mltext.R

context("literature_mltext")

test_that("literature_mltext", {
  skip_on_cran()

  tt <- literature_mltext(text = "cellular")

  expect_is(tt, "data.frame")
  expect_is(tt$pmid, "character")
  expect_is(tt$pmcid, "character")
  expect_is(tt$title, "character")
  expect_is(tt$authors, "list")
  expect_is(tt$grantIds, "list")
  expect_is(tt$grantAgencies, "list")
  expect_is(tt$retractions, "list")
  expect_is(tt$journal, "character")
  expect_is(tt$journalShort, "character")
  expect_is(tt$day, "integer")
  expect_is(tt$month, "integer")
  expect_is(tt$year, "integer")
  expect_is(tt$meshHeadings, "list")
  expect_is(tt$hasAbstract, "logical")
  expect_is(tt$score, "numeric")
  expect_is(tt$snippets, "list")
  expect_is(tt$affiliation, "list")
})

Try the rif package in your browser

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

rif documentation built on May 2, 2019, 5:54 a.m.