Subversion Repositories bdplot

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 pdel 1
### Overruling with local config files if present.
2
### if reread=TRUE, local config files are reread. 
3
bd.reset <- function(reread=FALSE){
4
  if(reread){
5
    .bdsetpars(.bdconf.default())
6
    wd <- getwd()
7
    if(!is.na(file.info("~/.bdp_config.R")$size))
8
      {
9
        cat("Sourcing ~/.bdp_config.R\n")
10
        source(file="~/.bdp_config.R")
11
      }
12
    if(!is.na(file.info(paste(wd,"bdp_config_local.R",sep="/"))$size))
13
      {
14
        cat("Sourcing bdp_config_local.R\n")
15
        source(file="bdp_config_local.R")
16
      }
17
    ##     .BDPars.default should be set to .BDPars
18
    .bdsetdefpars(.bdgetpars())
19
  } else {
20
    .bdsetpars(.bdgetdefpars())
21
  }
22
 
23
### this solution is kind of ugly. If the two lists contain elements of the same name, the first of them will be used. Templates should also be used from user env.
24
  .bdsetpars(c(.bdgetpars(),  .bdpapertemplates()))
25
 
26
}