I am running through loop and I want to select columns 1,i,j
When I run it with 1 i j
I get this result:
> trainingSet[,c(1,i,j)]
[1] 1 2 3
When i run it for example with 1 2 3
I got this result that expected:
> trainingSet[,c(1,2,3)]
Class Alcohol Malic_acid
1: 1 14.23 1.71
2: 1 13.20 1.78
3: 1 13.16 2.36
4: 1 14.37 1.95
5: 1 13.24 2.59
---
122: 3 14.16 2.51
123: 3 13.71 5.65
124: 3 13.27 4.28
125: 3 13.17 2.59
126: 3 14.13 4.10
How i can fix this?