When you are testing whether or not the data supplied to extract.digits() is numeric data, I think you should be using is.numeric(). As it stands now, the use of class(data) != "numeric" produces unexpected errors when the class is "integer". Consider the following:
Hello Carlos,
When you are testing whether or not the data supplied to
extract.digits()
is numeric data, I think you should be usingis.numeric()
. As it stands now, the use ofclass(data) != "numeric"
produces unexpected errors when the class is"integer"
. Consider the following:This error is returned because while
dat$v1
is clearly numeric, the callclass(dat$v1)
will return"integer"
.On a different note, thank you for a wonderful R package!
-Paul