This implies colnames(x) <- ...
.
# S3 method for class 'shapviz'
dimnames(x) <- value
Like x
, but with replaced dimnames.
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))
x <- shapviz(S, X, baseline = 4)
dimnames(x) <- list(1:2, c("a", "b"))
dimnames(x)
#> [[1]]
#> [1] "1" "2"
#>
#> [[2]]
#> [1] "a" "b"
#>
colnames(x) <- c("x", "y")
colnames(x)
#> [1] "x" "y"