setEmptyCellsValue: Changes multiple invalid values for a unique invalid value

Usage Arguments Examples

View source: R/setEmptyCellsValue.R

Usage

1
setEmptyCellsValue(x, ef = c(NA, -999, 0), fw = NULL)

Arguments

x

Vector with multiple empty symbols.

ef

Empty Flag number,character, symbol (NA, Inf), etc. What is meant to be "empty". flag could be a vector but all of itS elements must be different of the posible valid values of x.

fw

The unique number,character, symbol (NA, Inf), etc. which represents empty cells. What is the symbol meaning empty cell?. Default to NA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
xe <- c(-999, 1, 0, NA)
print(xe)
setEmptyCellsValue(xe)
setEmptyCellsValue(xe, fw = 1000)
# example 2
xe <- data.frame(a = 3:6, b = 0, c = 0, d = 0, e = 0)
xe[2, 1] <- 0
xe[1, 4] <- 3
xe[2, 3] <- 3
xe[3, 3] <- 3
xe[3, 5] <- 3
xe[4, 2] <- 3
print(xe)
setEmptyCellsValue(x = xe, ef = 0)

mathphysmx/cleanTable documentation built on May 29, 2019, 2:51 p.m.