Re: [Rd] dir.create does not return a value (PR#13686)

2009-05-02 Thread Josh Ulrich
Robert, The function always returns a value, but it doesn't print the value. Look at the source code for dir.create(), then read ?invisible. Best, Josh -- http://www.fosstrading.com On Sat, May 2, 2009 at 7:41 AM, Robert Hijmans wrote: > Thanks, I am not sure if this is desirable (a function

Re: [Rd] dir.create does not return a value (PR#13686)

2009-05-02 Thread Robert Hijmans
Thanks, I am not sure if this is desirable (a function returning a value only when 'asked' to do so), but I am intrigued. How can one put such behaviour in an R function? Robert On Sat, May 2, 2009 at 8:27 PM, Sundar Dorai-Raj wrote: > Not a bug. Try: > > print(dir.create("foo")) > > or > > foo

Re: [Rd] dir.create does not return a value (PR#13686)

2009-05-02 Thread Sundar Dorai-Raj
However, there is a bug in ?dir.create: "'dir.create' indicates failure if the dirwctory already exiss." > sessionInfo() R version 2.9.0 (2009-04-17) i386-apple-darwin8.11.1 locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices ut

Re: [Rd] dir.create does not return a value (PR#13686)

2009-05-02 Thread Sundar Dorai-Raj
Not a bug. Try: print(dir.create("foo")) or foo <- dir.create("foo") foo HTH, --sundar On Sat, May 2, 2009 at 5:10 AM, wrote: > ?dir.create  (part of the base package) says that: > "dir.create and Sys.chmod return a logical vector indicating which > operation succeeded for each of the files

[Rd] dir.create does not return a value (PR#13686)

2009-05-02 Thread r . hijmans
?dir.create (part of the base package) says that: "dir.create and Sys.chmod return a logical vector indicating which operation succeeded for each of the files attempted" However, on my system it returns nothing (whether successful or not): > dir.create(":::@!#!::") > dir.create('b') > session