sub-.tableMatrix: Bracket

Description Usage Arguments Value Examples

Description

tableMatrix method, passes data.table bracket functionality to the table attribute. Assigning works only for tab part and only i and j from data.table is used. If j is numeric, it corresponds to first attribute after tmName names.

Bracket

Usage

1
2
3
4
5
## S3 method for class 'tableMatrix'
x[...]

## S3 replacement method for class 'tableMatrix'
x[i, j] <- value

Arguments

x

tableMatrix object.

...

Passed arguments.

i

Same as i in data.table

j

Same as j in data.table

value

Value to be set.

Value

tableMatrix or vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(images8By8)

# Create tableMatrix from images8By8
TM <- tableMatrix(images8By8, 1:3, 4:ncol(images8By8))


TM[2,1] <- "aaa"

TM[1,"dimX"] <- 1000

# setting row
TM[2,] <- list("aaa", 1000, 1000)

# setting column
TM[,2] <- 1

tableMatrix documentation built on May 1, 2019, 8:42 p.m.