R version 4.4.0 alpha (2024-04-05 r86350 ucrt) 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. > library(CodeDepends) > > > sc = readScript(system.file("samples", "cacherCode", "cacher1.R", package = "CodeDepends")) > info = getInputs(sc) > vars = getVariables(info) > stopifnot(identical(vars, c("tmp", "cities", "classes", "vars", "data", "data", #second one is an update + "estimates", "effect", "stderr"))) > > o = structure(lapply(vars, CodeDepends:::getDependsOn, info, vars), names = vars) > > g = makeVariableGraph(system.file("samples", "cacherCode", "cacher1.R", package = "CodeDepends")) > g = makeVariableGraph(system.file("samples", "cacherCode", "cacher2.R", package = "CodeDepends")) > > > > # info[[5]] should have data as an update, not an output > # And should also have names<- as a function. > # So data would be an update variable, implying it is an input > # but it is neither an explicit input or output. > > > > proc.time() user system elapsed 0.70 0.03 0.71