Learn R Programming

dmtools (version 0.2.4)

choose_test.wbc: Filter final result

Description

Filter final result

Usage

# S3 method for wbc
choose_test(obj, test = "mis", group_id = T)

Arguments

obj

An object. Class wbc.

test

A character scalar. Parameters, which use to filter the final dataset, default: "mis": "ok" - wbc, which is calculated correct, "mis" - wbc, which is calculated incorrect.

group_id

A logical scalar, default is TRUE.True is grouped by id, otherwise, it isn't grouped.

Value

The dataset by a value of test.

Examples

Run this code
# NOT RUN {
id <- c("01", "02", "03")
wbc_post <- c(5.6, 7.8, 8.1)
lym_rel_post <- c(21, 25, 30)
lym_abs_post <- c(1.18, 1.95, 2.13)

df <- data.frame(
  id, wbc_post, lym_rel_post, lym_abs_post,
  stringsAsFactors = FALSE
)

wbcc <- system.file("wbcc.xlsx", package = "dmtools")
obj_wbc <- wbc(wbcc, id)

obj_wbc <- check(obj_wbc, df)
choose_test(obj_wbc, "mis")

# }

Run the code above in your browser using DataLab