Dear Stephanie,

Have a look at the testthat package and the related article in the R Journal.

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and 
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
thierry.onkel...@inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than 
asking him to perform a post-mortem examination: he may be able to say what the 
experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure 
that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] 
Namens Stephanie Locke
Verzonden: woensdag 10 september 2014 9:55
Aan: r-devel@r-project.org
Onderwerp: [Rd] How to test impact of candidate changes to package?

I use a package to contain simple functions that can be handled by unit tests 
for correctness and more complex functions that combine the simple functions 
with business logic.  Where there are proposals to change either the simple 
functions or the business logic, a sample needs to be run before the change and 
then after it to understand the impact of the change.

I do this currently by
1. Using Rmarkdown documents
2. Loading the package as-is
3. Getting my sample
4. Running my sample through the package as-is and outputting table of results 
5. sourceing new copies of functions 6. Running my sample again and outputting 
table of results 7. Reloading package and sourceing different copies of 
functions as required

I really don't think this is a good way to do this as it risks missing 
downstream dependencies of the functions I'm trying to load into the global 
namespace to test.

Has anyone else had to do this sort of testing before on their packages? How 
did you do it? Am I missing an obvious package / framework that can do this?

Cheers,
Steph

--
Stephanie Locke
BI & Credit Risk Analyst




The contents of this e-mail and of any attachments transmitted with it are 
confidential and intended solely for the use of the individual(s) to whom they 
are addressed. If you are not an intended recipient or the person responsible 
for delivering this e-mail to the intended recipient(s), you have received this 
e-mail in error, and access to it by you is not authorised. You may not use, 
copy, distribute, disclose or rely on it or any attachment, or any part of it 
or any attachment in any way. If you have received this e-mail in error please 
notify Optimum Credit Ltd by email on webmas...@optimumcredit.co.uk or phone on 
03330 143125 and then delete it.

All reasonable precautions have been taken to ensure that no viruses are 
present in E-mail. As we cannot accept responsibility for loss or damage 
arising from the use of E-mail or any attachment we recommend you subject these 
to your usual virus checking procedures prior to use. Any opinions expressed in 
this e-mail are those of the person sending it and not necessarily those of 
Optimum Credit Ltd.

Optimum Credit Ltd, Haywood House South, Dumfries Place, Cardiff, CF10 3GA

Authorised and regulated by the Financial Conduct Authority

Optimum Credit Ltd. Registered office: Haywood House South, Dumfries Place, 
Cardiff, CF10 3GA. Registered in England and Wales No. 08698121

Calls may be monitored or recorded for training, compliance and evidential 
purposes.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en 
binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is 
door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the 
writer and may not be regarded as stating an official position of INBO, as long 
as the message is not confirmed by a duly signed document.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to