From murdoch.duncan at gmail.com  Wed Aug 26 14:22:44 2015
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Wed, 26 Aug 2015 08:22:44 -0400
Subject: [Rd] declaring dependencies of shiny app in inst/
In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570B128F783@icexch-m1.ic.ac.uk>
References: <2CB2DA8E426F3541AB1907F98ABA6570B128F718@icexch-m1.ic.ac.uk>
	<55DDA352.2060801@gmail.com>
	<2CB2DA8E426F3541AB1907F98ABA6570B128F783@icexch-m1.ic.ac.uk>
Message-ID: <55DDAF94.2050806@gmail.com>

On 26/08/2015 8:00 AM, Jombart, Thibaut wrote:
> Hi there
> 
> thanks for the answer. 
> 
>>> But are their better ways / best practices?
>> You'll have to ask questions like these on a Shiny forum.
> 
> Done. New thread there: https://goo.gl/17hsAa
> 
>>> On a related topic: are there plans of formally incorporating shiny apps in the structure of a R package, so that the checks will run through the code of the apps as well?
> 
>> No, but it would be very easy to do:  just write a function that tests
>> those things, and call it from a script in the tests directory.
> 
> Yes, though in this case tests would merely check that the code can be sourced without error. I was thinking more of looking for unstated dependencies in code effectively used by the package, though indirectly. I guess it is only relevant if distributing shiny apps alongisde packages becomes common practice. I am not sure how trendy it is yet, but wouldn't be surprised to see it become increasingly frequent.

Your test function can test whatever interests you.  If you want to test
for dependencies, just do it.  You can see how R implements those tests
by looking in the tools package, and either use them directly, or modify
them to your needs.

Duncan Murdoch



[Rd] declaring dependencies of shiny app in inst/
Duncan Murdoch