# Working with VDS files using the sparklyr R package + plans for R API?

**URL:** https://discuss.hail.is/t/working-with-vds-files-using-the-sparklyr-r-package-plans-for-r-api/193
**Category:** Help \[0.1\]
**Created:** [April 25, 2017, 8:14pm UTC](https://discuss.hail.is/t/working-with-vds-files-using-the-sparklyr-r-package-plans-for-r-api/193 "2017-04-25T20:14:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jhuyghe](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jhuyghe](https://discuss.hail.is/u/jhuyghe)
#### Post date: [April 25, 2017, 8:14pm UTC](https://discuss.hail.is/t/working-with-vds-files-using-the-sparklyr-r-package-plans-for-r-api/193/1 "2017-04-25T20:14:27Z")

</div>

Hello,

Since a VDS file is based on the Parquet file format, I was wondering whether anyone has experience working with VDS files within an R environment using the sparklyr package. Also, are there ongoing or planned efforts within the Hail community to build an R API?

Thank you,

- Jeroen

---

<div class="post-metadata">

### Author: ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)
#### Post date: [April 25, 2017, 8:32pm UTC](https://discuss.hail.is/t/working-with-vds-files-using-the-sparklyr-r-package-plans-for-r-api/193/2 "2017-04-25T20:32:43Z")

</div>

Hi Jeroen,  
There are people like @konradjk who have some experience using Hail + SparklyR, but they’ve mostly been using it to work with key tables (very similar to spark dataframes) rather than VDS objects. Konrad’s Python prep went something like this:

```python
vds.variants_keytable().to_dataframe().write.parquet('file.parquet')

```

Then used SparklyR to read + process the file.

We would love to have a full R API, but don’t have any plans to build one right now.

---

<div class="post-metadata">

### Author: ![konradjk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/konradjk/32/12_2.png) [@konradjk](https://discuss.hail.is/u/konradjk)
#### Post date: [July 22, 2017, 3:52pm UTC](https://discuss.hail.is/t/working-with-vds-files-using-the-sparklyr-r-package-plans-for-r-api/193/3 "2017-07-22T15:52:27Z")

</div>

Yep, this works reasonably well, but last I looked, some datatypes did not transfer over swimmingly: I think at the time `set`s would break the load in R, but if you drop them/select only the columns you need, it works fine.
