From spencer.graves at prodsyse.com  Tue Dec 18 13:24:57 2012
From: spencer.graves at prodsyse.com (Spencer Graves)
Date: Tue, 18 Dec 2012 04:24:57 -0800
Subject: [Rd] Call function only when running via R CMD check?
In-Reply-To: <CAFDcVCQ5RgSJTh+7eiJNDb7zLf_AZUCBQvD7TkXbYY5r+yNx+g@mail.gmail.com>
References: <50D01EE4.2020706@cbio.uct.ac.za>
	<CAFDcVCQ5RgSJTh+7eiJNDb7zLf_AZUCBQvD7TkXbYY5r+yNx+g@mail.gmail.com>
Message-ID: <50D06099.9050500@prodsyse.com>

Have you considered the CRAN function in "fda"?  Spencer


On 12/18/2012 4:00 AM, Henrik Bengtsson wrote:
> Hi Renaud,
>
> On Tue, Dec 18, 2012 at 8:44 AM, Renaud Gaujoux <renaud at cbio.uct.ac.za> wrote:
>> Hi Henrik (and list),
>>
>> I am interested in a similar feature, and would be happy to see the
>> suggestions you got off-line :)
>> Have you come up with a robust solution, which would work in a variety of
>> situations (in examples, tests, \Sexpr calls, etc..)?
> see queryRCmdCheck() of R.utils.  Example:
>
> # Get the 'R CMD check' status, if any
> status <- R.utils::queryRCmdCheck()
>
> if (status != "notRunning") {
>    cat("The current R session was launched by R CMD check. Status:",
> status, "\n")
> } else {
>    cat("The current R session was not launched by R CMD check.\n")
> }
>
> I haven't tested it with Sweave, but with examples and tests.
>
> R.utils 1.18.0 is on CRAN, but you'd want 1.18.3, because:
>
> Version: 1.18.3 [2012-11-06]
> o BUG FIX: queryRCmdCheck() did not detect "tests" evidences when
>    'R CMD check' was testing multiple architectures.
>
> It may be another couple of weeks before I submit it to CRAN, but in
> the meanwhile you can grab it via:
>
> source("http://aroma-project.org/hbLite.R");
> hbLite("R.utils")
>
> Any feedback (positive or negative) is appreciated.
>
> Hope it helps
>
> /Henrik
>
>
>> Thank you.
>>
>> Bests,
>> Renaud
>>
>> --
>> Renaud Gaujoux
>> Computational Biology - University of Cape Town
>> South Africa
>>
>>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>


-- 
Spencer Graves, PE, PhD
President and Chief Technology Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San Jos?, CA 95126
ph:  408-655-4567
web:  www.structuremonitoring.com



[Rd] Call function only when running via R CMD check?
Spencer Graves