Re: [R] Strange compiling behaviour

2012-11-01 Thread R. Michael Weylandt
On Wed, Oct 31, 2012 at 9:14 PM, Worik R wrote: > Compiling this little function gets me some strange behaviour > > .initDataDir <- function(){ > if(file.exists(LOCATION)) { > if(as.logical(file.info(LOCATION)["isdir"]))return > stop(LOCATION, " exists but is not a directory") > } >

[R] Strange compiling behaviour

2012-10-31 Thread Worik R
Compiling this little function gets me some strange behaviour .initDataDir <- function(){ if(file.exists(LOCATION)) { if(as.logical(file.info(LOCATION)["isdir"]))return stop(LOCATION, " exists but is not a directory") } Z <- dir.create(LOCATION) if(!Z){ stop(geterrmessage()) ##