I changed the solution, but now i wanted to change the inf values in the matrix with NA values. Next one hour R studio is crashed! Is there any fast solution to change the cells value in inf to NA???? @nirgrahamuk i tried with this solution, but is crashed:
you're simply trying to chew on too much data. the time to process that matrix is subject to On2.
You need to decide to calculate on less at a time, or find a supercomputer
start small. make a robust process. profile its timing, estimate its scalability.
These steps are all important on your way to addressing a potential monster task, and they might encourage you to abandon your dreams, or put a price on it. I.e. you might estimate how much cloud compute you might need to execute in reasonable time, and see how much that would cost on azure.