OT: issue of '\tests' subdir again [Power / Sample Size]
Dear Detlew,
Recently I added one more subdirectory '\tests' to my packages because I was asked to add 'test' by CRAN maintainer. Thus it reminds me your previous post again. I saw you put the subdir '\tests' under '\inst', not the same subdir of '\R'. In this case, there are two subdir under '\inst': one is '\tests' and the other is '\doc' in your PowerTOST package. After installation, both '\tests' and '\doc' will appear under package directory. If you want to test if all these R scripts work properly (not for demo), you probably should move 'tests' subdir from '\inst\tests' to '\tests'. That is one more upper level and the same dir as '\R'. (Reference:
Under the directory of '\stab.Rcheck', there is subdir called '\tests' and all results (outputs) of test runs can be found there with file extension of
ps. Helmut could not find the subdir '\tests' in his previous post. That was because you added subdir of '\inst\tests' since v0.9-10. However, at that moment (2012-01-02), what Helmut installed was v0.9-0 or even earlier ver. Of course, there was no subdir of '\tests' yet. From CRAN archives, it shows:
Helmut should be able to find '\tests' subdir now.
Recently I added one more subdirectory '\tests' to my packages because I was asked to add 'test' by CRAN maintainer. Thus it reminds me your previous post again. I saw you put the subdir '\tests' under '\inst', not the same subdir of '\R'. In this case, there are two subdir under '\inst': one is '\tests' and the other is '\doc' in your PowerTOST package. After installation, both '\tests' and '\doc' will appear under package directory. If you want to test if all these R scripts work properly (not for demo), you probably should move 'tests' subdir from '\inst\tests' to '\tests'. That is one more upper level and the same dir as '\R'. (Reference:
Writing R Extensions). Then when you check your package with command line of R CMD check --as-cran pk-name, you will see if all test codes are OK. For example, I check my package stab, I get the following message:
F:\R>R CMD check --as-cran stab
* using log directory 'F:/R/stab.Rcheck'
* using R version 3.0.2 (2013-09-25)
* using platform: i386-w64-mingw32 (32-bit)
...[cut many lines here]
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ... NONE
* checking for unstated dependencies in tests ... OK
* checking tests ...
Running 'stab_test_run.R'
OK <--- here shows all results of test runs (I just had one test file for this example)
* checking PDF version of manual ... OK
See
'F:/R/stab.Rcheck/00check.log'
for details.Under the directory of '\stab.Rcheck', there is subdir called '\tests' and all results (outputs) of test runs can be found there with file extension of
.Rout. In this case, the subsir '\tests' won't be included in the binary package file, but it is still included in the source tarball. That is the subdir '\tests' will not appear under package after package installation. I don't know if this is what you want or not. I guess CRAN maintainer will depend on this to examine if there is any 'test' included with a package. If you put '\tests' under '\inst', you will not see the messages of '* checking tests ...'ps. Helmut could not find the subdir '\tests' in his previous post. That was because you added subdir of '\inst\tests' since v0.9-10. However, at that moment (2012-01-02), what Helmut installed was v0.9-0 or even earlier ver. Of course, there was no subdir of '\tests' yet. From CRAN archives, it shows:
...
PowerTOST_0.9-0.tar.gz 2011-Dec-15 18:07:47 255.8K application/x-gzip
PowerTOST_0.9-10.tar.gz 2012-Jul-20 14:14:36 299.7K application/x-gzip
...Helmut should be able to find '\tests' subdir now.
❝ ...
❝ Seems I hadn't really understand what the purpose of the \tests subdirectory in a R-package is for and how it functions. Any R guru out there which don't let me die in blithe ignorance?
❝ Until I have fixed this issue you can download the source code tarball to get access to the scripts.
❝ ...
—
All the best,
-- Yung-jin Lee
bear v2.9.6:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
All the best,
-- Yung-jin Lee
bear v2.9.6:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Complete thread:
- Power for unbalanced cross-over d_labes 2011-01-14 15:21 [Power / Sample Size]
- Great post! Helmut 2011-01-14 16:16
- Santa is coming d_labes 2011-12-22 09:30
- PowerTOST Ben 2012-01-02 17:39
- BIBDs Helmut 2012-01-02 17:53
- Uuups d_labes 2012-01-17 11:49
- the \tests subdirectory in a R-package yjlee168 2013-06-11 23:03
- To demo() or not d_labes 2013-06-14 13:28
- demo() is not demo yjlee168 2013-06-15 22:04
- To demo() or not d_labes 2013-06-14 13:28
- OT: issue of '\tests' subdir againyjlee168 2013-09-28 23:23
- the \tests subdirectory in a R-package yjlee168 2013-06-11 23:03
- Uuups d_labes 2012-01-17 11:49
- PowerTOST robust d_labes 2012-01-17 11:53
- BIBDs Helmut 2012-01-02 17:53
- PowerTOST Ben 2012-01-02 17:39
- Santa is coming d_labes 2011-12-22 09:30
- Great post! Helmut 2011-01-14 16:16
