Learn R Programming

qdap (version 1.3.5)

blank2NA: Replace Blanks in a dataframe

Description

Replaces blank (empty) cells in a dataframe. Generally, for internal use.

Usage

blank2NA(dataframe, missing = NA)

Arguments

dataframe
A dataframe with blank (empty) cells.
missing
Value to replace empty cells with.

Value

  • Returns a data frame with blank spaces replaced.

See Also

rm_row

Examples

Run this code
set.seed(15)
dat <- data.frame(matrix(sample(c(month.abb[1:4], ""), 50, TRUE),
    10, byrow = TRUE), stringsAsFactors = FALSE)

dat
blank2NA(dat)

Run the code above in your browser using DataLab