If I have a data.frame call MyDF
with 108 variables and I want to apply factor(MyDF[, OnColumns 8 to 100]
. How would I do this?
So in pseudocode:
for(i=8, i < 101, i++)
{
# apply factor() to each column from 8 to 100
factor( MyDF[,i] )
}
Does that make sense?