informat: A function to check whether a given data table/matrix/data...

Description Usage Arguments Value Examples

View source: R/informat.R

Description

A function to check whether a given data table/matrix/data frame is in the appropriate for drpop.

Usage

1
informat(data, K = 2)

Arguments

data

The data table/matrix/data frame which is to be checked.

K

The number of lists (optional).

Value

A boolean for whether data is in the appropriate format.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data = matrix(sample(c(0,1), 2000, replace = TRUE), ncol = 2)
x = matrix(rnorm(nrow(data)*3, 2,1), nrow = nrow(data))

informat(data = data)
#this returns TRUE

data = cbind(data, x)
informat(data = data)
#this returns TRUE

informat(data = data, K = 3)
#this returns FALSE

drpop documentation built on Nov. 6, 2021, 1:06 a.m.