Inner Product In R