logical_to_labelled: Convert columns of type logical to numeric labelled...

View source: R/labelled.R

logical_to_labelledR Documentation

Convert columns of type logical to numeric labelled 'yes'/'no'

Description

Values in logical columns are converted from TRUE/FALSE to 1/2, with labels 'Yes'/'No'.

Usage

logical_to_labelled(df, selected_cols = NULL)

Arguments

df

data frame

selected_cols

character. A vector of selected column names to convert to labelled numeric. These should all be of type logical.

Value

A data frame


rmgpanw/rawutil documentation built on May 20, 2022, 1:29 a.m.