checkUserED: Check Whether The User Input ED Dataframe Satisfies Function...

View source: R/checkUserED.R

checkUserEDR Documentation

Check Whether The User Input ED Dataframe Satisfies Function Requirement

Description

Given a data.frame ED and two user specified indices, check whether these arguments can be used successfully by functions overallSimilarity and competeMicrobiota. This function only check for common requirements, and each function carries out the data.frame update and function-specific checks. Function stops early if it identifies errors cannot be corrected by function.

Usage

checkUserED(ED, firstMicrobe, lastMicrobe)

Arguments

ED

The data.frame to be passed in as ED arguments in other functions.

firstMicrobe

The value to be passed in as firstMicrobe in other functions.

lastMicrobe

The value to be passed in as lastMicrobe in other functions.

Value

A two-element logical vector. The first indicating whether lastMicrobe needs to be updated in respective function, while the second indicating whether the ED frame contains unexpected values (other than 0, 1, T/F may be accepted but not recommended) in columns between firstMicrobe and lastMicrobe.

Examples

 ## Not run: 
  reportVec <- checkUserED(EnzymeDistribution, 4, 10)
  reportVec
 
## End(Not run)


MolyWang/microCompet documentation built on Feb. 26, 2023, 9:29 p.m.