I'm trying to make a loop read individual sheets from an excel file and load them into individual matrices in R. Im getting stuck on the syntax to make the loop create independent files using the counter "i". I'd like the output to be Volcano.0, Volcano.1, Volcano.2, Volcano.3 etc....
Here is what I have that doesn't work:
for (i in 0:16){
tab <- paste0("Cluster", " ", i)
Volcano.[i] <- read_excel("/MyWorksheet.xlsx", sheet = tab)
}
I tried Volcano.i but that obviously just gave me Volcano.i at the end. What am I missing here?