Skip to content
Prev 275480 / 398506 Next

Library chron

I think you mean to use if instead of ifelse (and you should probably
read briefly on the difference between them: if is the regular
programming construct: ifelse is a vectorized thing)

if(length(theData) == 0) t0 <- t0 else t0 <- theData

which can be more expressly written as

t0 <- if(length(theData)==0) t0 else theData

Michael Weylandt
On Tue, Oct 25, 2011 at 4:05 AM, hchui <helena.chui at flinders.edu.au> wrote: