transform01Logical: takes logical data and replaces it with an alternative, eg...

View source: R/tools.R

transform01LogicalR Documentation

takes logical data and replaces it with an alternative, eg "Yes" and "No"

Description

takes logical data and replaces it with an alternative, eg "Yes" and "No"

Usage

transform01Logical(data, alternative = c("No", "Yes"), na.alternative = " ")

Arguments

data

data to be transformed, should be logicalm but can be 1's and 0's (internally these will be transformed into TRUE's and FALSE's respectively)

alternative

specifies what to transform TRUE (element 2) or FALSE (element 1) into

na.alternative

specifies what to use if NA is encountered

transform01Logical(c(T,F,F,T)) transform01Logical(c(1,0,0,1))

Value

data with alternatives in stead of TRUE/FALSE


BenBruyneel/BBPersonalR documentation built on Aug. 23, 2024, 8:28 p.m.