An R package for extended arrays