Problem loading data when published it to the server

Hello,

I have been trying to load multiple data sources to shiny apps.
My application currently has 2 data. I use the following method to load it:
load("data1.RData")
load("data2.RData")

When I publish it to the server in shiny apps I get:
Error: object 'data2' not found

If I run it locally on my machine it works correctly but when publish it to the server it doesn´t.

Appreciate any light on the matter.

Hi,
make sure that the path is right, maybe is in a different folder.
also, restart session in R and run the app, to be sure that data2 was not in memory when testing.
that's what i can think of, right now

Hi, thank you for your reply. Yes, the path is correct because load("data1.RData") loads correctly but load("data2.RData") doesn't.