Subversion Repositories bdplot

Rev

Rev 5 | Details | Compare with Previous | 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
      }
68 pdel 12
    localconf <- paste(wd,"bdp_config_local.R",sep="/")
13
    if(!is.na(file.info(localconf)$size))
5 pdel 14
      {
68 pdel 15
        cat("Sourcing ",localconf,"\n")
5 pdel 16
        source(file="bdp_config_local.R")
17
      }
18
    ##     .BDPars.default should be set to .BDPars
19
    .bdsetdefpars(.bdgetpars())
20
  } else {
21
    .bdsetpars(.bdgetdefpars())
22
  }
23
 
24
### 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.
25
  .bdsetpars(c(.bdgetpars(),  .bdpapertemplates()))
26
 
27
}