bayesFR = function(.path = NULL,
df, W, y,
Kernel.G = NULL,
Kernel.E = NULL,
gid,env,
g.model = "FIXED",
w.model = "FIXED",
e.model = "FIXED",
ge.model = "FIXED",
nIter = 15E3,
burnIn = 5E3,
thin = 10,
R2 = .6,
dir.names = NULL,
verbose = FALSE){
if(is.null(dir.names)){dir.names="output_dataframes"}
homedir = getwd()
if(is.null(.path)){.path = getwd()}
dir = paste0(.path,"/",dir.names)
cat(paste0("creating directory ", dir, "\n"));
dir.create(dir)
setwd(dir)
.outut = vector(mode = "list",length = ncol(W))
names(.outut) = colnames(W)
namesC = colnames(W)
for(COV in 1:ncol(W)){
covDir = paste0("BGLR_",namesC[COV])
dir.create(covDir)
setwd(covDir)
model = bGREG(df = df,
W = W[,COV],
y = y,
Kernel.G =Kernel.G,
Kernel.E = Kernel.E,gid = gid,env = env,
g.model = g.model,w.model = w.model,e.model = e.model,
ge.model = ge.model,nIter = nIter,burnIn = burnIn,
thin = thin,R2 = R2,verbose = verbose)
setwd(dir)
saveRDS(object = model$df,file = as.character(paste0("output_",namesC[COV])))
.outut[[COV]] = model$mixed.solve
}
return(.outut)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.