I've got some R code that returns a matrix that is 12 columns wide with over 1M rows. When I try to use getarraytovba to return that matrix into a VBA variant, it fails. When I say it fails I mean that it runs the code without generating any errors but the VBA variable will be empty. If I shrink the R matrix to below 5000 rows then VBA will capture the variable. If it is between 5000 and 20000 (ball park) then sometimes it will work and sometimes it won't. My system has 16GBs of ram and is only 40% utilized when I'm attempting to move the data to VBA. The memory usage doesn't seem to change as I have task manager open as I'm running the code.
I've googled the subject and the only answer I've found is that it is limited by physical memory but since I have nearly 10GB of free memory I think there is more to it than just that. Can anyone help me shed light on why getarraytovba is so limiting?