Learn R Programming

jagshelper (version 0.4.0)

rcolors: Random Colors

Description

Creates a vector of randomly-generated colors.

Usage

rcolors(n)

Value

A vector of colors

Arguments

n

Vector length

Author

Matt Tyers

Examples

Run this code
n <- 1000
cols <- rcolors(n)
x <- runif(n)
y <- runif(n)
plot(x,y, col=cols, pch=16)

Run the code above in your browser using DataLab