'memory.size()' is no longer supported

Warning message:
'memory.size()' is no longer supported
How to solve it

That function is no longer available because it currently has no use, now the available memory for the R process is the same as the available memory in the system. Can you clarify what is your specific problem with this?