grid maker for R