Making it clear which package log2() is coming from (#3)
This commit is contained in:
parent
12a33a3933
commit
3a479d1232
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ dec2bitv <- function(d, n) {
|
||||||
d <- d[]
|
d <- d[]
|
||||||
|
|
||||||
f <- e <- NA
|
f <- e <- NA
|
||||||
c(f, e) <- log2(max(d)) # How many digits do we need to represent the numbers?
|
c(f, e) <- matlab2r::log2(max(d)) # How many digits do we need to represent the numbers?
|
||||||
bits <- floor(d * 2 ^ (seq(1 - max(n, e), 0))) %% 2
|
bits <- floor(d * 2 ^ (seq(1 - max(n, e), 0))) %% 2
|
||||||
return(bits)
|
return(bits)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue