Specify the base of the log with base
argument.
elementlog_byname(a, base = exp(1))
a | a matrix or list of matrices |
---|---|
base | the base of the logarithm (default is |
M with each element replaced by its base base
logarithm
#> [1] 1m <- matrix(c(10,1,1,100), nrow = 2, dimnames = list(paste0("i", 1:2), paste0("c", 1:2))) %>% setrowtype("Industry") %>% setcoltype("Commodity") elementlog_byname(m)#> c1 c2 #> i1 2.302585 0.00000 #> i2 0.000000 4.60517 #> attr(,"rowtype") #> [1] "Industry" #> attr(,"coltype") #> [1] "Commodity"elementlog_byname(m, base = 10)#> c1 c2 #> i1 1 0 #> i2 0 2 #> attr(,"rowtype") #> [1] "Industry" #> attr(,"coltype") #> [1] "Commodity"