I am starting to do statistics and for my project I want to find correlation coefficients in order to find the variable, which correlates best with time. What I would like to do is to find the correlation between ONE row (e.g "A"), which represents a Variable and (or over) time (Columns 1 to 10). So how all the values in row 1 correlate to a timecourse of over lets say 10 days. If I use wrong terminology please excuse me, still a beginner.
# Dataframe
DF <- rbind(sample(1:100,10)/100, sample(1:100,10)/100, sample(1:100,1)/100)
colnames(DF) <- (1:10)
rownames(DF) <- c("A", "B", "C")
If I would do it in excel it would be something like =CORREL(B2:G2, $B$1:$G$1), whereas $B$1:$G$1 would be time and B2:G2 the values. I hope its clear what I try to say.
Thanks for your help