search for: properzero

Displaying 1 result from an estimated 1 matches for "properzero".

2000 Jan 04
0
formatC (bug and fix) (PR#394)
...integer(c(0,1,NA))) [1] "0" "0" "NA" BUG TRACED TO R-code of formatC() where x[!Ok] <- 0 unintendedly changes the storage.mode of x to double, while variable mode still signifies 'integer'. Thus the following is probably ok as bug fix ProperZero <- 0 storage.mode(ProperZero) <- mode x[!Ok] <- ProperZero At least the following tests are positive using this fix > formatC(as.integer(c(1,0,NA))) [1] "1" "0" "NA" > formatC(as.double(c(1,0,NA))) [1] "1" "0" &...