tests/testthat/test_letl.R

library('wrapr')

context("letl")

test_that("testl_let.R", {

  d <- data.frame(
    year= c(2005, 2005),
    name= c('a', 'a'),
    stringsAsFactors = FALSE)

  dstr <- d
  let(list(NEWCOL='val'),
      dstr$NEWCOL <- 7,
      subsMethod= 'stringsubs'
  )
  dlan <- d
  let(list(NEWCOL='val'),
      dlan$NEWCOL <- 7,
      subsMethod= 'langsubs'
  )
  #expect_equal(dsub, dstr)
  expect_equal(dstr, dlan)
})
WinVector/wrapr documentation built on Oct. 17, 2018, 8:20 p.m.