makeVec function

makeVec for checking or creating vectors

makeVec for checking or creating vectors

This is a convenience for handling function arguments. If x is a single value, it makes a vector of length d in which all values are equal to x. If x is a vector, check that its length is d.

makeVec(x = NULL, d = NULL)

Arguments

  • x: A single value or a vector
  • d: An integer, the desired size of the vector

Returns

A vector of length d

Author(s)

Paul E. Johnson pauljohn@ku.edu

  • Maintainer: Paul E. Johnson
  • License: GPL (>= 3.0)
  • Last published: 2022-08-06

Useful links