Adding new variable to data after a loop
for(i in 1:5) { # Head of for-loop
new_col <- rep(i, 3) # Creating new variable
data[ , i] <- new_col # Adding new variable to data
colnames(data)[i] <- paste0("Col_", i) # Renaming new variable
}