1.

Which of the following sort a dataframe by the order of the elements in B?(a) x[rev(order(x$B)),](b) x[ordersort(x$B),](c) x[order(x$B),](d) x[rev(x$B),]

Answer» Correct option is (a) x[rev(order(x$B)),]

To elaborate: x[rev(order(x$B)),] sort the dataframe in reverse order.


Discussion

No Comment Found

Related InterviewSolutions