abs_byname: Absolute value of matrix elements

View source: R/Unary.R

abs_bynameR Documentation

Absolute value of matrix elements

Description

Absolute value of matrix elements

Usage

abs_byname(a)

Arguments

a

a matrix or list of matrices

Value

a with each element replaced by its absolute value

Examples

abs_byname(1)
abs_byname(-1)
m <- matrix(c(-10,1,1,100), nrow = 2, dimnames = list(paste0("i", 1:2), paste0("c", 1:2))) %>%
  setrowtype("Industry") %>% setcoltype("Commodity")
abs_byname(m)

matsbyname documentation built on April 2, 2022, 1:06 a.m.