checkMD: Change dummy input to dummy matrix

Description Usage Arguments Details Author(s)

View source: R/auxFun.R

Description

Function to transform all input to a matrix. In addition, it checks whether all elements of the input are either 0 or 1.

Usage

1
2
    checkMD(input)
  

Arguments

input

An R object. Can be a matrix/dataframe/vector/scalar.

Details

checkMD() accepts one input and - if codeinput is a matrix - returns it without column names, otherwise transforms it into a matrix and returns it without column names. In case any of the elements of input are different from 0 or 1, it stops the routine and throws an error.

Author(s)

Gabriele Rovigatti


prodest documentation built on June 20, 2018, 5:04 p.m.