tests/testthat/test-factor_to_char.R

library(Kmisc)
library( testthat )

dat <- list( 
  list( 
    list( a=factor(1), b=factor(c(2,3,4)) ), 
    list( c=factor(c("a", "b", "c")) ) ), 
  factor(c(1,2,3)) 
  )

expect_identical( factor_to_char(dat), rapply(dat, as.character, how="list") )

Try the Kmisc package in your browser

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

Kmisc documentation built on May 29, 2017, 1:43 p.m.