Error in `FUN(X[[i]], ...)`: object 'root_dir' not found

image_sr <- rast(system.file("raster/pnoa.tiff", package = "OTBsegm"))
## connect to OTB (change to your directory)
otblink <- link2GI::linkOTB(searchLocation = "C:/OTB/")
test_that("Meanshift has same extent as input", {
test_that("Watershed has same extent as input", {
test_that("Morphological profiles is sf", {
test_that("Morphological profiles has rows", {
test_that("Morphological profiles has same extent as input", {
test_that("LSMS has same extent as input", {

"Morphological profiles has same extent as input"