tests/testthat/test-python-factors.R

context("factors")

test_that("R factors are converted to character", {
  skip_if_no_python()

  before <- iris$Species
  after <- py_to_r(r_to_py(before))
  expect_equal(as.character(before), after)
})
Mormukut11/R-interface-to-Python documentation built on May 21, 2019, 9:36 a.m.