zap_empty {haven}R Documentation

Convert empty strings into missing values.

Description

Convert empty strings into missing values.

Usage

zap_empty(x)

Arguments

x

A character vector

Value

A character vector with empty strings replaced by missing values.

See Also

Other zappers: zap_formats, zap_labels

Examples

x <- c("a", "", "c")
zap_empty(x)

[Package haven version 1.0.0 Index]