heatmap() function in R Language is used to plot a heatmap. Heatmap is defined as a graphical representation of data using colors to visualize the value of the matrix. In this to represent more common values or higher activities brighter colors basically reddish colors are used and to less common or activity values darker colors are preferred. Heatmap is also defined by the name of the shading matrix.
data: It represent matrix data, such as values of rows and columns
Return: This function draws a heatmap.
Here, in above example number of rows and columns are specified to draw heatmap with a given function.
In the above example heat map is drawn by using colorRampPalette to merge two different colors.