Skip to contents

Returns the last element using the function tail

Usage

lastElement(x)

Arguments

x

object

Value

The last element of object is returned: x[[length(x)]]

if x is a list (and not a data frame), otherwise tail(x, 1).