Dear Ram,

We hope you are doing good.

You are trying to normalize the data on multiple columns of the dataset which are not sequential.
Please correct me if my understanding is wrong.

We can normalize the columns by using for loop in R.
Lets take the example of flight dataset.

d1<-read.csv("C:/Priyanka/DS/Project/Flight Project/1987.csv", stringsAsFactors = FALSE)
normalize <- function(x) {
return ((x - min(x)) / (max(x) - min(x)))
for( i in cols)
dnormcol <- sapply(d1[i:i], normalize)
dnorm<-cbind(dnorm, dnormcol)

In the above R script I have mentioned the columns that I want to normalize in a list and assigned it to a 

Later used for loop that iterates through each element of the cols variable and applies normalize function on them.

I have tried it on my end and it is working fine. Please refer to the below screenshot.

Please let me know if this is the one you are looking for.

Waiting for your response.

Please feel free to revert if you need any further help.

Meanwhile if you feel satisfied with my response kindly leave your feedback by clicking on any one of the below smileys