When I try to remove the last row from a single column data frame, I get a vector back instead of a data frame:
> df = data.frame(a=1:10) > df a 1
Try adding the drop = FALSE option:
drop = FALSE
R> df[-(length(df[,1])), , drop = FALSE] a 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9