prepare structure for R package