R: 'Matrix' can not be unloaded, but 'writeMM' method not found
Ultimately I just restarted Rstudio as Konrad Rudolph suggested, imported Matrix library, and then writeMM method worked just fine. However, rownames were converted into just numbers, but I needed to keep the gene names instead as it was in dgcMatrix, so after some search I found a different way of doing that from here: 

http://www.sthda.com/english/wiki/saving-data-into-r-data-format-rds-and-rdata

So, I just did save() (and then, to load back - load()) and the rownames are maintained like I wanted it to be. So, storing it now as .RData file.