Learn R Programming

thisplot (version 0.3.1)

head.colors: Return the first part of a colors object

Description

Returns the first part of a colors object, similar to head() for data frames.

Usage

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

Value

A colors object with the first n rows.

Arguments

x

A colors object (data frame with color information).

n

Number of rows to return. Default is 6.

...

Additional arguments passed to head().

Examples

Run this code
head(get_colors())

head(get_colors(), n = 10)

Run the code above in your browser using DataLab