calculate correlation of broken time series Is it statistically correct to calculate correlations between two broken time series?
For example,
x <- seq(from = 1, to = 3000, by = 1) + 10 + rnorm(3000, sd = 5) 
y <- seq(from = 1, to = 3000, by = 1) + 10 + rnorm(3000, sd = 12) 

blockA1 <- c(1:500, 600:900)
blockB1 <- c(501:599, 901:2299)
blockA2 <- c(2300:2700,2901:3000)
blockB2 <- c(2701:2900)

blockA <- c(blockA1,blockA2)
blockB <- c(blockB1,blockB2)

cor(x[blockA], y[blockA])

Is this a valid way to compute correlations?
EDIT: For example, let's say I collected heart rate data continuously on day 1 (x) and day 2 (y). blockA are rest periods and blockB are activity periods.
By splitting the data into rest/activity blocks, I'm breaking the time series. Can I really assume that blockA1 + blockA2 (the entire rest period for day 1) is equivalent to measuring blockA continuously?

This is totally correct to do so. If you want an other method to compute a temporal trend, you can also have a look at the Mann-Kendall test. In R you have several packages proposing this (e.g. package trend, package Kendall)
