Somewhere I found this code
signdig = function(x)
{
length(gregexpr("[[:digit:]]", as.character(x))[[1]])
}
But this returns strange numbers, like
> L=matrix(c(15,5,9,3.111),nrow=2)
> kappa(L)
[1] 239.5819
> signdig(kappa(L))
[1] 15
Can somebody suggest an algorithm or code to solve it?
round(kappa(L))
– Adam Queksignif(kappa(L))
– akrunround(kappa(L))
rounds it.signif(kappa(L))
rounds it to six digits. – Harshvardhan