View source: R/changeSaveFile.R
changeSaveFile | R Documentation |
Use this to change the saveFile parameter in a pre-existing bayesOpt object.
changeSaveFile(optObj, saveFile = NULL)
optObj |
An object of class bayesOpt |
saveFile |
A filepath stored as a character. Must include the filename and extension as a .RDS. |
The same optObj
with the updated saveFile.
## Not run: scoringFunction <- function(x) { a <- exp(-(2-x)^2)*1.5 b <- exp(-(4-x)^2)*2 c <- exp(-(6-x)^2)*1 return(list(Score = a+b+c)) } bounds <- list(x = c(0,8)) Results <- bayesOpt( FUN = scoringFunction , bounds = bounds , initPoints = 3 , iters.n = 2 , gsPoints = 10 , saveFile = "filepath.RDS" ) Results <- changeSaveFile(Results,saveFile = "DifferentFile.RDS") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.