R Under development (unstable) (2024-01-28 r85838 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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. > ## Testing replacements examples with APSIM-X > ## Run a few tests for the examples > require(apsimx) Loading required package: apsimx APSIM(X) not found. If APSIM(X) is installed in an alternative location, set paths manually using 'apsimx_options' or 'apsim_options'. You can still try as the package will look into the registry (under Windows) > apsimx_options(warn.versions = FALSE) > > run.replacements.tests <- get(".run.local.tests", envir = apsimx.options) > > extd.dir <- system.file("extdata", package = "apsimx") > > replacements <- c("MaizeSoybean.apsimx","WheatRye.apsimx","Soybean.apsimx") > > tmp.dir <- tempdir() > > setwd(tmp.dir) > > if(run.replacements.tests){ + start <- Sys.time() + for(i in replacements){ + rep.tst <- apsimx(i, src.dir = extd.dir, cleanup = TRUE) + cat("Ran: ", i, "\n") + } + end <- Sys.time() + cat("Total time:", end - start, "\n") + if(Sys.info()[["sysname"]] != "Windows"){ + cat("APSIM-X version:", apsim_version(which = "inuse", verbose = FALSE)[1],"\n") + }else{ + aiu <- apsim_version(which = "inuse", verbose = FALSE)[2] + cat("APSIM-X version:", as.character(aiu[1,1]),"\n") + } + } > > proc.time() user system elapsed 0.71 0.14 0.84