0

When I load the acss package, I'm able to read its entropy function by simply writing entropy in the Console.

entropy
function (string) 
{
    check_string(string)
    splitted <- strsplit(string, "")
    y <- lapply(splitted, function(x) as.vector(table(x)))
    l <- nchar(string)
    y <- mapply(function(x, y) x/y, y, l, SIMPLIFY = FALSE)
    names(y) <- string
    vapply(y, function(x) -sum(x * log2(x)), 0)
}
<environment: namespace:acss>

However, if I try to read the first function inside entropy, check_string, writing its name in the console I get

check_string
Error: object 'check_string' not found

How can I read the source of check_string?

andandandand
  • 21,946
  • 60
  • 170
  • 271

0 Answers0