Skip to content
Prev 49921 / 63421 Next

iterated lapply

Use force() (or anything that evaluates mycondition, e.g. your print):

function(mycondition) {
  force(mycondition)
  function(i) mycondition * i
}

within the lapply() loop. 

Not a bug, but does surprise people. It is lazy evaluation.

  D.
On 2/23/15 12:57 PM, Daniel Kaschek wrote: