R history analysis