R convert matrix or data frame to sparseMatrix R convert matrix or data frame to sparseMatrix r r