# preprocessr
#
# Function: deskew()
#
# Description: A function to deskew data, borrowed from http://technicaltidbit.blogspot.com/2013/03/automatically-deskew-before-machine.html
#
# Author: Peter Xenopoulos
#
#
deskew <- function( vector, threshold=1.10 ) {
if( class(vector) != "numeric" ) {
warning("Vector must be numeric")
return(NA)
}
if( min(vector) <= 0 ) {
warning("Vector must contain values greater than 0")
return(NA)
}
t <- log( 1 + vector - min(vector) )
return(t)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.