tests/testthat/test-data_frame.R

context("data_frame")

# add_rownames -----------------------------------------------------------

test_that("add_rownames keeps the tbl classes (#882)", {
  expect_warning(
    res <- mtcars %>% add_rownames("Make&Model"),
    "Deprecated"
  )
  expect_equal(class(res), c("tbl_df", "tbl", "data.frame"))
})

Try the dplyr package in your browser

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

dplyr documentation built on July 4, 2019, 5:08 p.m.