To retrieve the data, Eikon Data APIs need to connect to the Eikon process running on the same local machine through localhost:9000 connection. It works on the local machine because you have run Eikon on the same machine that runs RStudio, as shown below.
On the other hand, when using RStudio Cloud, you are connecting to a different machine (or container) in Cloud and that machine doesn't have the Eikon installed. Therefore, it doesn't have the running Eikon process, as shown below.
This is why you can't use Eikon Data APIs on the RStudio Cloud. To make it work, you need to have Eikon Data API Proxy running on that remote machine in Cloud which is not possible because Eikon Data API Proxy only supports Windows and MacOS.
In conclousion, I think that Eikon Data APIs doesn't support this kind of usage.
For more information about these products, please contact your Refinitiv Account team or Sales team.
I assume that you are using R library created by Ahmed on Github. I have a chance to try it on RStudio Cloud and found the same issue. I guess that it's because the cloud version running on the server with some docker or virtualize environment so that the internal R process cannot connecting to Eikon desktop or Eikon API proxy which running on your local machine.