If you post your code we can pinpoint where exactly the issue is, but I bet you have a line towards the top of your code that looks like:
Df <- read.csv(<A Path to a file>) # Or some other read in file
Then I'll bet further down, when you are trying to calculate correlation, you are doing something like:
correlation_function(df)
But again, if you post your code, we could pinpoint your issue precisely.