I am trying to test the correlation for a given dataset:
> file <- read.csv("dataset.csv", header = TRUE, sep = ";", dec = ".")
> cor.test(file[, -file$ID], method = "spearman")
ID is identifying each point, so I dont want to consider that in the analysis. Even when considering the whole file, the error is the same
I get this error:
Error in cor.test.default(file[, -file$ID], method = "spearman") : argument "y" is missing, with no default
Why is this happening? Do you know how can I solve this? I know I am supposed to have both vectors (x and y), but I wanted to consider the whole dataset at the same time.