tests/testthat/test-lapply_depth.R

test_that("lapply_depth plucking works", {
  expect_equal(
     lapply_depth(list(A = list(one = 1, two = 2), B = list(one = 3, two = 4)), 1, `[[`, "one")
     , list(A = 1, B = 3)
  )
})

Try the vmTools package in your browser

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

vmTools documentation built on Aug. 8, 2025, 7:28 p.m.