This look really interesting but I don't understand what is happening. Please can someone explain the last line and what the bit in [] is doing. Ian df = data.frame( A=c('a','b','c'), B=c(1,2,3), C=c(10,20,30), stringsAsFactors=FALSE) newrow = c('X', 100, 200) rbind(df,newrow)[c(1,4,2,3),]