labelled_to_factors {tntpr} | R 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()
[Package tntpr version 1.0.3 Index]