Skip to content

Commit

Permalink
Implement check for real_scale in fi_pool_cluster
Browse files Browse the repository at this point in the history
Fixes #2. Add some notes for development.
  • Loading branch information
fredjaya committed Dec 4, 2023
1 parent 98124d6 commit 2f72f5c
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 285 deletions.
3 changes: 3 additions & 0 deletions R/fisher_information.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ fi_pool_cluster <- function(pool_size,
specificity,
form = "beta",
real_scale = FALSE) {

check_input("real_scale", real_scale)

s <- pool_size
N <- pool_number
K <- length(N)
Expand Down
32 changes: 28 additions & 4 deletions dev_resources/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# Function dependencies
# Developer resources and instructions

**While developing**
- Regularly run `test()` or `test_active_file()`

**Before committing**
- Run `check()`, address any errors, warnings and notes

**Before pushing**
- Sync with origin/main
- Address any conflicts
- Run dependency graph
- Run `test-coverage`

## Function dependency graph

Code to generate the function dependency graph:
```r
devtools::install_github("datastorm-open/DependenciesGraphs")
#devtools::install_github("datastorm-open/DependenciesGraphs")
library(DependenciesGraphs)
load_all()
dep <- envirDependencies("package:PoolPoweR")
plot(dep)
```

![](https://raw.githubusercontent.com/AngusMcLure/PoolPoweR/main/dependencies/dep.png?token=GHSAT0AAAAAACICLPCIT5EJVC32Y7QQITYCZKJTYEA)
![](https://raw.githubusercontent.com/AngusMcLure/PoolPoweR/main/dependencies/dep.png?token=GHSAT0AAAAAACICLPCIT5EJVC32Y7QQITYCZKJTYEA)

## Test coverage

```r
library(covr)
cov <- package_coverage()
write.csv(cov, "dev_resources/coverage_report.csv", quote = F, row.names = F)

# To show report markup in RStudio
report(cov)
```
Loading

0 comments on commit 2f72f5c

Please sign in to comment.