R/addDscal.R

"addDscal" <-
  function(modellist, dscal) {
    # dscal is list with structure:
    # list ( list (to, from, value = c(vector of scaling),perclp =logical))

    if (length(dscal) != 0) {
      for (i in 1:length(dscal)) {
        if (length(dscal[[i]]$perclp) == 0) {
          dscal[[i]]$perclp <- FALSE
        }
        modellist[[dscal[[i]]$to]]@dscalspec <- dscal[[i]]
        modellist[[dscal[[i]]$to]]@drel <- dscal[[i]]$value
      }
    }
    modellist
  }

Try the TIMP package in your browser

Any scripts or data that you put into this service are public.

TIMP documentation built on Dec. 28, 2022, 3:06 a.m.