datacheck: Check Input Data Tyoe

Description Usage Arguments Value Examples

View source: R/datacheck.R

Description

datacheck() is to check whether the data to be input is appropriate

Usage

1
datacheck(data, label, time)

Arguments

data

The input matrix of observed values. Rows represent repititions or samples, and columns represent observed time points

label

The input vector of labels. ith element of this vector should correspond to the label of ith row of data matrix X.

time

An input time grid vector

Value

NULL is appropriate, otherwise warning

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 library(refund)
 data(DTI)
 X <- DTI$cca
 y <- DTI$case
 t <- seq(0, 1, length.out = ncol(X))
  # not run
  # datacheck(X, y, t)
 allData <- cbind(X, y)
 allData <- allData[which(DTI$visit == 1), ]
 allData <- na.omit(allData)
 y <- allData[, ncol(allData)]
 X <- allData[, -ncol(allData)]
 t <- seq(0, 1, length.out = ncol(X))
 datacheck(X, y, t)

iantsuising/quickfun documentation built on Nov. 4, 2019, 1:52 p.m.