R Under development (unstable) (2026-02-08 r89382 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #!/usr/bin/env Rscript > # R Direct Metadata Loading Test (Simplified) > # Verifies that R can load and use comprehensive indicators metadata > > cat("\n") > cat("==================================================\n") ================================================== > cat("R Direct Metadata Lookup Test\n") R Direct Metadata Lookup Test > cat("==================================================\n") ================================================== > > # Determine the project root directory > # Works in CI (runs from repo root) and locally > script_dir <- tryCatch({ + # When run with Rscript, get the script's directory + dirname(sys.frame(1)$ofile) + }, error = function(e) { + # Fallback: use current working directory + getwd() + }) > > # Navigate to project root from tests/ directory > project_root <- if (basename(script_dir) == "tests") { + dirname(script_dir) + } else if (file.exists(file.path(script_dir, "R", "unicef_core.R"))) { + script_dir + } else if (file.exists(file.path(getwd(), "R", "unicef_core.R"))) { + getwd() + } else { + # CI environment: assume we're already in the project root + getwd() + } > > cat("Project root:", project_root, "\n") Project root: d:/RCompile/CRANincoming/R-devel/unicefData.Rcheck > > # Check if R directory exists > r_dir <- file.path(project_root, "R") > if (!dir.exists(r_dir)) { + cat("[SKIP] R directory not found at:", r_dir, "\n") + cat("This test requires the R source files to be present.\n") + quit(status = 0) + } [SKIP] R directory not found at: d:/RCompile/CRANincoming/R-devel/unicefData.Rcheck/R This test requires the R source files to be present. > proc.time() user system elapsed 0.07 0.07 0.14