R density calculation with kernel