diff --git a/DESCRIPTION b/DESCRIPTION index 895cbbd..3316381 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = "anita.k.nandi@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5087-2494")), person("Tim", "Lucas", email = "timcdlucas@gmail.com", role = "aut", comment = c(ORCID = "0000-0003-4694-8107")), diff --git a/cran-comments.md b/cran-comments.md index 4137d9b..c727a7b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -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' 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 @@ -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 diff --git a/man/prepare_data.Rd b/man/prepare_data.Rd index d0352ba..373a137 100644 --- a/man/prepare_data.Rd +++ b/man/prepare_data.Rd @@ -96,6 +96,6 @@ and sets covariate NAs pixels to the median value for the that covariate. test_data <- prepare_data(polygon_shapefile = spdf, covariate_rasters = cov_rasters) -} +} } diff --git a/src/disaggregation.cpp b/src/disaggregation.cpp index eef4a98..b8d19c1 100644 --- a/src/disaggregation.cpp +++ b/src/disaggregation.cpp @@ -95,8 +95,7 @@ Type objective_function::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); @@ -204,7 +203,7 @@ Type objective_function::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."); }