Learn R Programming

shapviz (version 0.9.5)

+.shapviz: Rowbinds two "shapviz" Objects

Description

Rowbinds two "shapviz" objects using +.

Usage

# S3 method for shapviz
+(e1, e2)

# S3 method for mshapviz +(e1, e2)

Value

A new object of class "shapviz".

Arguments

e1

The first object of class "shapviz".

e2

The second object of class "shapviz".

See Also

shapviz(), rbind.shapviz()

Examples

Run this code
S <- matrix(c(1, -1, -1, 1), ncol = 2, dimnames = list(NULL, c("x", "y")))
X <- data.frame(x = c("a", "b"), y = c(100, 10))
s1 <- shapviz(S, X, baseline = 4)[1]
s2 <- shapviz(S, X, baseline = 4)[2]
s <- s1 + s2
s
# mshapviz
S <- matrix(c(1, -1, -1, 1), ncol = 2, dimnames = list(NULL, c("x", "y")))
X <- data.frame(x = c("a", "b"), y = c(100, 10))
s1 <- shapviz(S, X, baseline = 4)[1L]
s2 <- shapviz(S, X, baseline = 4)[2L]
s <- mshapviz(c(shp1 = s1, shp2 = s2))
s + s

Run the code above in your browser using DataLab