From josh.m.ulrich at gmail.com  Sat May  2 15:47:31 2009
From: josh.m.ulrich at gmail.com (Josh Ulrich)
Date: Sat, 2 May 2009 08:47:31 -0500
Subject: [Rd] dir.create does not return a value (PR#13686)
In-Reply-To: <dc22b2570905020541n1941e631h683d2f1c457cb8e0@mail.gmail.com>
References: <20090502121009.A88EC2832187@mail.pubhealth.ku.dk>
	<c9ce82b00905020527m39eeb461q5b388d685f0690d0@mail.gmail.com>
	<dc22b2570905020541n1941e631h683d2f1c457cb8e0@mail.gmail.com>
Message-ID: <8cca69990905020647n2d558402odaea8949e0e26a89@mail.gmail.com>

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 <r.hijmans at gmail.com> wrote:
> 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 <sdorairaj at gmail.com> wrote:
>> 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, ?<r.hijmans at gmail.com> 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 attempted"
>>>
>>> However, on my system it returns nothing ?(whether successful or not):
>>>
>>>> dir.create(":::@!#!::")
>>>> dir.create('b')
>>>
>>>
>>>> sessionInfo()
>>> R version 2.9.0 (2009-04-17)
>>> i386-pc-mingw32
>>>
>>> locale:
>>> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>>> States.1252;LC_MONETARY=English_United
>>> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>>>
>>> attached base packages:
>>> [1] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base
>>>>
>>>
>>> HTH, Robert
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



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