I have a DataFrame X. In sparkR I can find the first row by typing
first(X)
Now I want to find the last one. 'last' is a aggregate function.
But when I type last(X) in sparkR I get this message Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘last’ for signature ‘"DataFrame"’ How can that be and how can I solve this?
In addition I can do head(X) to get the first rows but how can I get the last rows in X ?