clean_dta: Clean stata dataframes

View source: R/clean_dta.R

clean_dtaR Documentation

Clean stata dataframes

Description

This function deletes all attributes from dataframes, especially those imported from stata. Additionally, it converts empty character cells to NA.

Usage

clean_dta(df)

Arguments

df

The dataframe, typically a file imported from stata.

Value

A datafame without attributes and all empty character cells ("") are converted to NA.

Examples

# needs sjlabelled and haven packages installed
clean_dta(mtcars)

bsurial/bernr documentation built on Nov. 7, 2022, 1:41 a.m.