R/as.wcmd.R

Defines functions as.wcmd

Documented in as.wcmd

as.wcmd <- function(x) {

  if(!is.list(x))
    stop("'x' must be a list")

  varcheck(x, c("data", "item1", "ni", "name1"))
  if(is.na(pmatch("namel", names(x)))) {
    x$namelen <- as.numeric(x$item1) - as.numeric(x$name1)
    warning("Missing argument 'namelen' set to item1 - name1 = ",
      x$namelen)
  }
  class(x) <- "wcmd"

  return(x)
}

Try the Rwinsteps package in your browser

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

Rwinsteps documentation built on May 2, 2019, 1:08 p.m.