Skip to content

Commit

Permalink
Merge pull request #44 from aknandi/fix_builds
Browse files Browse the repository at this point in the history
Fix builds
  • Loading branch information
aknandi authored Dec 9, 2019
2 parents 2ddc636 + 0bc09bb commit 0ecb847
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: disaggregation
Type: Package
Title: Disaggregation Modelling
Version: 0.1.0
Version: 0.1.1
Authors@R: c(
person("Anita", "Nandi", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5087-2494")),
person("Tim", "Lucas", email = "[email protected]", role = "aut", comment = c(ORCID = "0000-0003-4694-8107")),
Expand Down
12 changes: 10 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## Resubmission
This is a resubmission. In this version I have:

* Version 0.1.0 was accepted but subsequently failed some builds. These errors have now been fixed, details below. The version is now 0.1.1

disaggregation.cpp:207:18: warning: explicitly assigning value of variable of type 'vector<Type>' to itself [-Wself-assign-overloaded]
This line has been removed
disaggregation.cpp:99:22: error: call of overloaded 'sqrt(int)' is ambiguous
Type kappa = sqrt(8) / rho;
Changed this to Type kappa = sqrt(8.0) / rho;

* Omitted the redundant and rather unspecific part "Useful Functions for" in the DESCRIPTION title.

* Added a useful reference for disaggregation modelling in the Description field of the DESCRIPTION file
Expand Down Expand Up @@ -31,8 +39,8 @@ This is a resubmission. In this version I have:

* \dontrun{} is only used if the example really cannot be executed.

Examples that are the most interesting use INLA so we don't run these examples.
One example takes longer than 5 seconds and so \donttest{} is used instead.
Examples that are the most interesting use INLA so we don't run these examples.
One example takes longer than 5 seconds and so \donttest{} is used instead.

## Test environments
* local Windows 10, R 3.6.1
Expand Down
2 changes: 1 addition & 1 deletion man/prepare_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/disaggregation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ Type objective_function<Type>::operator()()
DATA_SCALAR(prior_sigma_prob);

// Convert hyperparameters to natural scale
// todo
Type kappa = sqrt(8) / rho;
Type kappa = sqrt(8.0) / rho;
Type nu = 1;
Type tau = sigma * pow(kappa, nu) * sqrt(4 * M_PI);

Expand Down Expand Up @@ -204,7 +203,7 @@ Type objective_function<Type>::operator()()
} else if(link == 1) {
pixel_pred = exp(pixel_pred);
} else if(link == 2){
pixel_pred = pixel_pred;
// Don't need to do anything, i.e. pixel_pred = pixel_pred;
} else {
error("Link function not implemented.");
}
Expand Down

0 comments on commit 0ecb847

Please sign in to comment.