inst/samples/loop.R

x = rnorm(10)
total = 0
for(i in seq(2, length = length(x) - 1))
  if(x[i] > 2*x[i-1])
       total = total + 1
   

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.