reorder_response_factor: Establish condition of interest as 1 and absence as 0.

View source: R/response.R

reorder_response_factorR Documentation

Establish condition of interest as 1 and absence as 0.

Description

Transforms levels in a factor to 1 if they match condition of interest ( condition) or 0 otherwise (absent) or 0 otherwise (absent).

Usage

reorder_response_factor(response_fct, condition, absent)

Arguments

response_fct

A factor with different categories (levels).

condition

Name of category being the condition of interest.

absent

Character vector of categories not corresponding to the condition of interest.

Value

factorwith values (0, 1) where 1 matches condition of interest.


ROCnGO documentation built on Aug. 8, 2025, 6:07 p.m.