inst/samples/dual.R

{
n = 100
x = rnorm(n)
e = rnorm(n)
abc = 1  # irrelevant and should be discarded
}

{
y = 3 + 10*x + e
}

{
a = 1:3
b = sum(a)
k = rpois(3, b)
rm(a, b)
}

{
fit = lm(y ~ x)
plot(fit)
rm(y, x)
}

{
  # Here just to check the file dependencies
 source("foo.R")    
}

Try the CodeDepends package in your browser

Any scripts or data that you put into this service are public.

CodeDepends documentation built on May 2, 2019, 4:19 a.m.