area_check <- 1000
wh <- hex_dim(area_check^2) #e.g. a square kilometer if spatial units are in meters
area <- hex_area(wh[1]/2) #inverse operation
all.equal(area_check,sqrt(area))
wi <- hex_wd(wh[1])
all.equal(wh[2],wi)
Run the code above in your browser using DataLab