R/templateNames.R

Defines functions templateNames `templateNames<-`

Documented in templateNames

# Why don't we just make this a method for the generic names function?
# Two functions for extracting and replacing template names
# Modified: 6 Sept 2015

templateNames <- function(object) return(names(object@templates)) 

`templateNames<-` <-
function(
   object=NULL, 
   value
) {

   if(length(object@templates) == length(value)) 
      names(object@templates) <- value else
      stop('Length of names argument, ', length(value), ', does not match number of templates, ', length(object@templates))

   return(object)

}

Try the monitoR package in your browser

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

monitoR documentation built on May 1, 2019, 6:28 p.m.