Element Wise Operations In R