I want to remove duplicate combinations of sessionid, qf and qn from the following data
sessionid qf qn city 1 9
In your example the repeated rows were entirely repeated. unique works with data.frames.
unique
udf <- unique( my.data.frame )
As for sorting... joran just posted the answer.