Find the dimensions of a ggplot2 heatmap.

Usage

heatmap_dims(p)

Arguments

p
a ggplot2 heatmap (or any ggplot with x and y mappings)

Value

a list with the number of rows and columns

Description

This works by identifying the number of unique points in the variables mapped to the x and y axes.