Skip to content

Commit

Permalink
Added 'internal.opt' to options
Browse files Browse the repository at this point in the history
In this way, the default value for 'internal.opt' is set in options
  • Loading branch information
hrue committed Nov 27, 2023
1 parent 29e4524 commit ea95f97
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion r-inla.org/doc/hyper/likelihood/ggaussian.tex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
\item[initial] \verb!4!
\item[fixed] \verb!FALSE!
\item[prior] \verb!normal!
\item[param] \verb!0 10!
\item[param] \verb!9.33 0.61!
\item[to.theta] \verb!function(x) x!
\item[from.theta] \verb!function(x) x!
\end{description}
Expand Down
Binary file modified r-inla.org/doc/likelihood/ggaussian.pdf
Binary file not shown.
5 changes: 5 additions & 0 deletions rinla/R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#'
#' \item{save.memory}{Save memory at the cost of (minor) accuracy and computing time?}
#'
#' \item{internal.opt}{Do internal online optimisations or not}
#'
#' \item{working.directory}{The name of the working directory.}
#'
#' \item{silent}{Run the inla-program in a silent mode?}
Expand Down Expand Up @@ -121,6 +123,7 @@ NULL
keep = FALSE,
verbose = FALSE,
save.memory = FALSE,
internal.opt = TRUE,
working.directory = NULL,
silent = TRUE,
debug = FALSE,
Expand Down Expand Up @@ -152,6 +155,7 @@ NULL
"keep",
"verbose",
"save.memory",
"internal.opt",
"working.directory",
"silent",
"debug",
Expand Down Expand Up @@ -244,6 +248,7 @@ NULL
"keep",
"verbose",
"save.memory",
"internal.opt",
"working.directory",
"silent",
"debug",
Expand Down
6 changes: 5 additions & 1 deletion rinla/R/sections.R
Original file line number Diff line number Diff line change
Expand Up @@ -1265,10 +1265,14 @@
inla.write.boolean.field("mlik", mlik, file)
inla.write.boolean.field("q", q, file)
inla.write.boolean.field("graph", graph, file)

if (is.null(internal.opt)) {
internal.opt <- inla.getOption("internal.opt")
}
inla.write.boolean.field("internal.opt", internal.opt, file)

if (is.null(save.memory))
save.memory <- inla.getOption('save.memory')
save.memory <- inla.getOption("save.memory")
inla.write.boolean.field("save.memory", save.memory, file)

config.lite <- FALSE
Expand Down
4 changes: 2 additions & 2 deletions rinla/R/set.default.arguments.R
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ control.gcpo <-
graph = FALSE,

#' @param internal.opt A boolean variable, if to do internal online
#' optimisations or not. (Default TRUE.)
internal.opt = TRUE,
#' optimisations or not. (Default `inla.getOption("internal.opt")`)
internal.opt = NULL,

#' @param save.memory A boolean variable, make choices which
#' saves memory over accuracy. (Default 'inla.getOption("save.memory")')
Expand Down
4 changes: 2 additions & 2 deletions rinla/man/control.compute.Rd

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

4 changes: 3 additions & 1 deletion rinla/man/options.Rd

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

0 comments on commit ea95f97

Please sign in to comment.