Split Vector and apply Mann Kendall test

I have a long vector of financial time series information, price and volume. I expand the price vector based on the volume vector so I essentially get a price per share traded, and so only one vector is analyzed.
I would like to split this vector into lengths of 17500 each, and apply the Mann-Kendall trend analysis on each of these new vectors.
Below is the code I have for this.

I am getting an error from the Mann Kendall test, as this split method is producing outputs as a list.

Is there a way to either create a new vector and run the Mann Kendall test on each vector, with the output from each test easily acessible?


priceexp <- rep(price, volume)

max <- 17500
xx <- seq_along(priceexp)
d1 <- split(priceexp, ceiling(xx/max))

for(i in (1:length(d1))) {
I have attached a txt file with the two vectors "price" and "volume".
Last edited: