0

Is the following M4_regular_matrix time series data? I am a bit confused since The rows indicate locations although the columns consist of time. We actually collected data of every location for 8 different time points.

library(Matrix)

i <- c(1, 3, 8, 4, 2, 7, 6, 9, 1, 4, 10, 5, 11, 2, 12) j <- c(2, 5, 3, 8, 6, 2, 4, 2, 4, 5, 2, 7, 3, 2, 1) x <- rpois(15, 5) M4 <- sparseMatrix(i, j, x = x) M4_regular_matrix <- as(M4, "matrix")

rownames(M4_regular_matrix) <- c("location 1", "location 2","location 3","location 4", "location 5","location 6","location 7","location 8", "location 9","location 10","location 11","location 12")

colnames(M4_regular_matrix) <- c("time 1", "time 2", "time 3", "time 4", "time 5", "time 6", "time 7", "time 8")

  • 2
    I don't understand the question. You collected it, why would you not know if it is a time series? Are you asking about the data format? – mkt Aug 05 '23 at 14:42
  • 2
    Related but closed: https://stats.stackexchange.com/questions/623270/time-series-plot-in-r – Henry Aug 05 '23 at 15:17

0 Answers0