I'm new to R. I have multiple vectors which I want to store in a list in a for loop. I've tried using [], [[]] and () and I am getting an error stating that dateRange not found. Can you please help and fix my code?
dateRange1 <- c('2015-01','2015-12')
dateRange2 <- c('2016-01','2016-12')
ind <- list()
for (a in 1:2) {
ind[a] <- dateRange(a)
}
ind
Thanks and have a great day!