Learn R Programming

MorphoTools2 (version 1.0.2.1)

head.morphodata: Return the First or Last Parts of an Object

Description

Returns the first or last parts of a object.

Usage

# S3 method for classifdata
head(x, n = 6, ...)

# S3 method for classifdata tail(x, n = 6, ...)

# S3 method for morphodata head(x, n = 6, ...)

# S3 method for morphodata tail(x, n = 6, ...)

Value

A data.frame, containing the first or last n individuals of the passed object.

Arguments

x

an object of class morphodata or classifdata.

n

number of rows to print.

...

arguments to be passed to or from other methods.

Details

Object passed as parameter is formated to data.frame. A head() (tail()) returns the first (last) n rows when n >= 0 or all but the last (first) n rows when n < 0.

Examples

Run this code
data(centaurea)

head(centaurea)
tail(centaurea)

Run the code above in your browser using DataLab