inst/tinytest/test-pureBasename.R

logo = system.file(
  "ex/logo.tif"
  , package = "terra"
)

expect_identical(
  pureBasename(logo)
  , target = "logo"
)

expect_identical(
  pureBasename(
    logo
    , slash = TRUE
  )
  , target = "/logo"
  , info = "respects 'slash' input"
)

Try the Orcs package in your browser

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

Orcs documentation built on Jan. 6, 2023, 5:14 p.m.