labelled_to_factors: Convert all 'labelled'-class columns to factors.

View source: R/labelled_to_factors.R

labelled_to_factorsR Documentation

Convert all labelled-class columns to factors.

Description

Deprecated. Use the as_factor() function from the haven package instead for the same functionality.

Takes a data.frame, checks for columns that are class labelled from the haven package, and converts them to factor class.

Usage

labelled_to_factors(labels_df)

Arguments

labels_df

a data.frame containing some columns of class labelled

Value

Returns a data.frame, the same size as labels_df

Examples


tntpr::fake_county |>
  haven::as_factor()


tntp/tntpr documentation built on May 4, 2024, 1:24 a.m.