blank2NA function

Replace Blanks in a dataframe

Replace Blanks in a dataframe

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

blank2NA(dataframe, missing = NA)

Arguments

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

Returns

Returns a data frame with blank spaces replaced.

Examples

## Not run: set.seed(15) dat <- data.frame(matrix(sample(c(month.abb[1:4], ""), 50, TRUE), 10, byrow = TRUE), stringsAsFactors = FALSE) dat blank2NA(dat) ## End(Not run)

See Also

rm_row

  • Maintainer: Tyler Rinker
  • License: GPL-2
  • Last published: 2023-05-11