powered by
This function computes the correlation upon picking the best lag and adjusting the data for lags
comp.corr(data, time, C)
a matrix with rows representing genes and columns representing different timepoints (NA's added when lags are needed)
a vector which contains all the timepoints represented in the data
a numeric value of C used in computing weighted correlation
a simmilarity matrix with values between -1 and 1 (1 highly correlated, 0 no correlation)
# NOT RUN { comp.corr(array(rnorm(40), c(5, 8)), time = t(array(c(0, 5, 10, 15, 20, 25, 30, 35), c(8, 5))), C = 10) # }
Run the code above in your browser using DataLab