getRow.tableMatrix: Get or set row from the matrix attribute

Description Usage Arguments Value Examples

Description

tableMatrix method to get or set a row from the matrix attribute.

Usage

1
2
3
4
5
## S3 method for class 'tableMatrix'
getRow(obj, i = NULL, repo = NULL, ...)

## S3 method for class 'tableMatrix'
setRow(obj, value, i = NULL, repo = NULL, ...)

Arguments

obj

tableMatrix object.

i

Integer. Row index in tab.

repo

Numeric vector. Vector with 2 elements - matN and matRow.

...

Passed arguments.

value

Vector for setting value.

Value

Row from the matrix part.

Examples

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

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

# Row 91 in tab(TM) corresponds to second matrix, first row 
row <- getRow(TM, 91)

# Row 91 in tab(TM) corresponds to second matrix, first row 
getRow(TM, repo=c(2,1))

# Change matrix row corresponding to row 91 in tab(TM) 
TM <- setRow(TM, rep(2,length(row)), 91)
getRow(TM, 91)

InferenceTechnologies/tableMatrix documentation built on May 8, 2019, 1:39 p.m.