# R session aborted when reading feather file from Julia

**URL:** https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937
**Category:** Data
**Created:** [July 2, 2019, 5:57pm UTC](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937 "2019-07-02T17:57:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ElOceanografo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eloceanografo/32/624_2.png) [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)
#### Post date: [July 2, 2019, 5:57pm UTC](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937/1 "2019-07-02T17:57:08Z")

</div>

I’m trying to output a DataFrame as a Feather file from a Julia script and then import it into R. When I try to load it, though, R crashes (RGui closes out immediately, RStudio gives me an “R session aborted: R encountered a fatal error” popup). I can reproduce it using this MWE:

```julia
using DataFrames, Feather
df = DataFrame(a = ["foo", "bar", "baz"], b = randn(3))
Feather.write("test.feather", df)

```

In R:

```nohighlight
library(feather)
read_feather("test.feather")

```

I can read and write feather files from R without problems, so it seems there is something getting lost in translation from the Julia side. Anybody have any ideas?

On Windows 10, using:  
Julia v1.1.1, DataFrames v0.18.3, Feather v0.5.2  
R v3.6.0, feather v0.3.3

---

<div class="post-metadata">

### Author: ![ElOceanografo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eloceanografo/32/624_2.png) [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)
#### Post date: [July 2, 2019, 6:36pm UTC](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937/2 "2019-07-02T18:36:00Z")

</div>

A workaround using RCall:

```julia
using RCall
R"library(feather)"
R"write_feather($df, 'test.feather')"

```

---

<div class="post-metadata">

### Author: ![Rudi79](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rudi79/32/3884_2.png) [@Rudi79](https://discourse.julialang.org/u/Rudi79)
#### Post date: [July 2, 2019, 7:11pm UTC](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937/3 "2019-07-02T19:11:04Z")

</div>

Another fix is to pin flatbuffers to version 0.4.0. See [https://github.com/JuliaData/FlatBuffers.jl/issues/38](https://github.com/JuliaData/FlatBuffers.jl/issues/38)  
And the references there in.

---

<div class="post-metadata">

### Author: ![jkbest2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jkbest2/32/7350_2.png) [@jkbest2](https://discourse.julialang.org/u/jkbest2)
#### Post date: [August 8, 2019, 7:30pm UTC](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937/4 "2019-08-08T19:30:26Z")

</div>

[Possibly relevant blog post.](http://arrow.apache.org/blog/2019/08/08/r-package-on-cran/) It looks like improvements to the R implementation of Feather are now available from the `arrow` package. It would probably be worth trying `arrow::read_feather` to see if this is still an issue.
