Add 'data_frame' function (#376)

This adds a `data_frame` function as outlined in #376.

TODO:

- [ ] Recycle vectors of length 1
- [ ] Add unit tests
- [ ] Move more logic to C (?)