Does DolphinDB have a function to calculate the correlation between two columns?

Viewed 16

I want to calculate the correlation between two columns, does DolphinDB have such functions? It seems that the function "corr" only apply to the vector. I get the error as below:

corr(x, y) => getDoubleConst method not supported
1 Answers

If x, y are two columns of an in-memory table t, the correct script is as below:

corr(t.x, t.y)   //here t.x and t.y are vectors.
Related