I have a list of 31 data frames (split_data_V3.0) that I am trying to convert to xts object using lapply. The code gets executed but when I try to open the elements from the new lists (split_data_V3.0_zoo, split_data_V3.0_xts) I get the error message "Error in names[[i]] : subscript out of bounds". Could someone help with this ?
grouping <- data_V3.0_csv$Symbol
split_data_V3.0 <- split(data_V3.0_csv, grouping)
split_data_V3.0_zoo <- lapply(split_data_V3.0, function (x) read.zoo(x, index.column = c("X")))
split_data_V3.0_xts <- lapply(split_data_V3.0_zoo, function(x) as.xts(x))
Error message:
split_data_V3.0_zoo <- lapply(split_data_V3.0, function (x) read.zoo(x, index.column = c("X")))
> split_data_V3.0_xts <- lapply(split_data_V3.0_zoo, function(x) as.xts(x))
> View(split_data_V3.0_zoo)
> View(split_data_V3.0_xts)
Error in names[[i]] : subscript out of bounds
Error in names[[i]] : subscript out of bounds