for(row in 3:11)
{ i= 0
if(col1[row] == 0)
{
breakfast[i] = 0
}
else if(col1[row] == 1)
{
breakfast[i] = 0.428
}
else{
breakfast[i] = 0.858
}
i = i + 1
}
This is the code for my first column and I want to implement this in all the columns of my excel sheet. Is there any shortcut