Correlation between three variables

I am having trouble finding a correlation coefficient between three variables. I get an error message each time saying "Error in df[, c("FPS", "ST", "GR")] :
object of type 'closure' is not subsettable"

All three conditions have numerical values so i'm unsure what the issue is

This is my dataset. I am trying to find correlations between the last three columns

Looking at your screenshot and comparing it to your error message, it looks like your data.frame is called Df but you are trying to subset a variable df. I think that's the problem.

If that doesn't help, it might help to have a sample of your code to troubleshoot further.

How do I change Df into a dataset?

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:


But again, if you post your code, we could pinpoint your issue precisely.

This has worked thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.