Learn R Programming

NetExplorer (version 0.0.2)

colorize: Colorize according to a column in a data frame

Description

Add a new column to a data frame of gradient color based on a specific column of the data frame

Usage

colorize(df, col.att, color, new.col.name)

Arguments

df

a data frame

col.att

an integer indicating the column with which to create the gradient

color

a character vector of length two indicating the starting point of the gradient and the ending point of the gradiant

new.col.name

a string indicating the gradient column name added to argument df

Value

a data frame.

Details

argument df with an additional column corresponding to the gradient column based on argument att.