Subversion Repositories bdplot

Rev

Rev 5 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 20
1
#### bdp is a necessary function to edit the internal .BDPars
1
#### bdp is a necessary function to edit the internal .BDPars
2
bdp <- function(...)
2
bdp <- function(...)
3
  {
3
  {
4
    single <- FALSE
4
    single <- FALSE
5
    args <- list(...)
5
    args <- list(...)
6
 
6
 
7
### case one.
7
### case one.
8
### No arguments.
8
### No arguments.
9
### Should just return the contents of .BDPars
9
### Should just return the contents of .BDPars
10
    if (!length(args)) {
10
    if (!length(args)) {
11
      args <- as.list(.bdgetpars())
11
      args <- as.list(.bdgetpars())
12
      args
12
      args
13
    } else {
13
    } else {
14
### case 2
14
### case 2
15
### arguments given. These must be written to .BDPars
15
### arguments given. These must be written to .BDPars
16
      BDPars <- .bdgetpars()
16
      BDPars <- .bdgetpars()
17
      for(arg in names(args)){
17
      for(arg in names(args)){
18
        BDPars[[arg]] <- args[[arg]]
18
        BDPars[[arg]] <- args[[arg]]
19
      }
19
      }
20
      .bdsetpars(BDPars)
20
      .bdsetpars(BDPars)
21
    }
21
    }
22
    
22
    
23
  }
23
  }
24
 
24
 
25
 
25
 
26
 
26
 
27
 
27
 
28
### leftovers from par(). Maybe necessary.
28
### leftovers from par(). Maybe necessary.
29
## if (all(unlist(lapply(args, is.character)))) 
29
## if (all(unlist(lapply(args, is.character)))) 
30
##         args <- as.list(unlist(args))
30
##         args <- as.list(unlist(args))
31
##       if (length(args) == 1) {
31
##       if (length(args) == 1) {
32
##         if (is.list(args[[1]]) | is.null(args[[1]])) 
32
##         if (is.list(args[[1]]) | is.null(args[[1]])) 
33
##           args <- args[[1]]
33
##           args <- args[[1]]
34
##         else if (is.null(names(args))) 
34
##         else if (is.null(names(args))) 
35
##           single <- TRUE
35
##           single <- TRUE
36
##       }
36
##       }
37
 
37
 
38
 
38
 
39
 
39