I am running a cor.test on two columns within a file/table.
tmp <- read.table(files_to_test[i], header=TRUE, sep="\t")
## Obtain Columns To Compare ##
colA <-tmp[compareA]
colB <-tmp[compareB]
# sctr = 'spearman cor.test result'
sctr <- cor.test(colA, colB, alternative="two.sided", method="spearman")
But I am getting this confounding error...
Error in cor.test.default(colA, colB, alternative = "two.sided", method = "spearman") :
'x' must be a numeric vector
the values in the columns ARE numbers but
is.numeric(colA) = FALSE
class (colA) = data.frame
What have I missed?