tests/testthat/test-gs4_fodder.R

test_that("gs4_fodder() works", {
  dat <- gs4_fodder(3, 5)
  expect_named(dat, LETTERS[1:5])
  ltrs <- rep(LETTERS[1:5], each = 3)
  nbrs <- rep(1:3, 5) + 1
  expect_equal(
    as.vector(as.matrix(dat)),
    paste0(ltrs, nbrs)
  )
})

Try the googlesheets4 package in your browser

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

googlesheets4 documentation built on July 9, 2023, 7:40 p.m.