# reduce number of threads to pass CRAN checks (you can ignore this)
data.table::setDTthreads(1)
# simulate open, high, low, and close prices with spread 1%
x <- sim(n = 1000, spread = 0.01)
# estimate the spread
edge(x$Open, x$High, x$Low, x$Close)
Run the code above in your browser using DataLab