Return first or last element of an object. These functions are convenience
wrappers for `head(x, n=1, ...)`

and `tail(x, n=1, ...)`

.

1 2 |

`x` |
data object |

`n` |
a single integer. If positive, size for the resulting object: number of elements for a vector (including lists), rows for a matrix or data frame or lines for a function. If negative, all but the 'n' last/first number of elements of 'x'. |

`...` |
arguments to be passed to or from other methods. |

An object (usually) like 'x' but generally smaller.

Gregory R. Warnes greg@warnes.net

`head`

,
`tail`

,
`left`

,
`right`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.