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?

Yes it is correct but keep in mind that why are blocking the series.One realistic reason is that there exists heteroscedasticity on your data in specific time periods. By excluding them (blocking), and keeping only the time period that $\sigma^2$ is stationary or your data are homoskedastic will give you the opportunity to nicely model them with arch or garch.
