I am programming R and am confronted with the following syntax errorÖ
Here is the code:
for (i in (1:7)) {for (index in seq(i,56,8)) {values[[length(values)+1]] <- c(ADDLINEORDER[index]) } time_series_values[[length(time_series_value)+1]] <- values}
Error: unexpected symbol in "for (i in (1:7)) {for (index in seq(i,56,8)) {values[[length(values)+1]] <- c(ADDLINEORDER[index]) } time_series_values"
what I want is: lets say that there is a vector (1,5,6,7,3,9) as input
As I result I want to have it like ((1,6,3),(5,7,9))
1 5 are the starting points, I want it to be iterated by 2 so (1, 6, 9) are together in one list.
Thanks
@Spacedman has found the problem. Formatting properly also fixes it: