Usage Arguments Details Value Examples
1 | shiftCellsH(x, bLength = 1, fillwith = NULL, ef = c(NA, -999, 0))
|
x |
table (data.frame/2D-matrix) to be checked |
bLength |
Block length. Length (number of cells) of each block. Default to 1, i.e., a single cell is a block. |
fillwith |
The unique number,character, symbol (NA, Inf), etc. which represents empty cells. What is the symbol meaning empty cell?. If untouched, no change will be done on the cell values |
ef |
argument passed to EmptyRow |
depends on EmptyRow.R and MoveCells2left.R
x
with the blocks shifted if the case
mcb
a table in which each column represents a block and the value of each cell represents the corresponding column in x
from where the block comes to xn
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # example 1
# Check what shiftCellsH does to each row
flag <- NA
xe <- matrix(data = flag, nrow = 6, ncol = 4)
xe[1, 1] <- 1
xe[2, 3:4] <- 2
xe[3, 3] <- 3
xe[4, 3] <- 4
xe[4, 4] <- 0
xe[5, 2:4] <- 0
xe[6, 2] <- 0
xe[6, 3:4] <- 6
print(xe)
shiftCellsH(x = xe, bLength = 2,
ef = c(0, flag), fillwith = -999)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.