atrace add call to saveToLocalRepo at the end of a given function.

atrace(FUN = "lm", object = "z")

Arguments

FUN

name of a function to be traced (character)

object

name of an object that should be traced (character)

Details

Function atrace calls the trace function.

Contact

Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues

References

Biecek P and Kosinski M (2017). "archivist: An R Package for Managing, Recording and Restoring Data Analysis Results." _Journal of Statistical Software_, *82*(11), pp. 1-28. doi: 10.18637/jss.v082.i11 (URL: http://doi.org/10.18637/jss.v082.i11). URL https://github.com/pbiecek/archivist

See also

Examples

# read the object from local directory createLocalRepo("arepo_test", default=TRUE)
#> Directory arepo_test does exist and contain the backpack.db file. Use force=TRUE to reinitialize.
atrace("lm", "z")
#> Tracing function "lm" in package "stats"
#> [1] "lm"
lm(Sepal.Length~Sepal.Width, data=iris)
#> Tracing lm(Sepal.Length ~ Sepal.Width, data = iris) on exit
#> #> Call: #> lm(formula = Sepal.Length ~ Sepal.Width, data = iris) #> #> Coefficients: #> (Intercept) Sepal.Width #> 6.5262 -0.2234 #>
asearch("class:lm")
#> $`18a98048f0584469483afb65294ce3ed` #> #> Call: #> lm(formula = Petal.Length ~ Sepal.Length, data = iris) #> #> Coefficients: #> (Intercept) Sepal.Length #> -7.101 1.858 #> #> #> $`2a6e492cb6982f230e48cf46023e2e4f` #> #> Call: #> lm(formula = Petal.Length ~ Sepal.Length + Species, data = iris) #> #> Coefficients: #> (Intercept) Sepal.Length Speciesversicolor Speciesvirginica #> -1.7023 0.6321 2.2101 3.0900 #> #> #> $`990861c7c27812ee959f10e5f76fe2c3` #> #> Call: #> lm(formula = Petal.Length ~ Species, data = `__LHS`) #> #> Coefficients: #> (Intercept) Speciesversicolor Speciesvirginica #> 1.462 2.507 3.509 #> #> #> $f2152da1fea50f1e76643d0569b3ed84 #> #> Call: #> lm(formula = Sepal.Length ~ Sepal.Width, data = iris) #> #> Coefficients: #> (Intercept) Sepal.Width #> 6.5262 -0.2234 #> #>
untrace("lm")
#> Untracing function "lm" in package "stats"