obmodeling is an R package which uses xts time series objects to manipulate and analyze:
Market depth statistics
Price movement, liquidity changes (Cartea, Jaimungal, and Penalva 2015)
Market spread (De Jong and Rindi 2009, 91–96)
Measures of volatility (De Jong and Rindi 2009, 92, and Cartea, Jaimungal, and Penalva (2015))
PIN/VPIN (Easley et al. 1996, Easley, Prado, and O’Hara (2012))
Price pressure (Hendershott and Menkveld 2014, Cont, Kukanov, and Stoikov (2014))
Trade imbalance (Cont, Kukanov, and Stoikov 2014)