Hello,
since I am encountering a lot of problems exporting dataframes from julia to R (there is always something wrong with the formatting, probably a missing quote) so I am trying to use Feather to do the job.
The dataframe exported with CSV.write("dir/dataframe.tsv", df; delim='\t')
has this structure:
> df <- read.table(
+ paste("dir/dataframe.tsv"),
+ header = TRUE,
+ row.names = NULL,
+ dec = ".",
+ sep = ",",
+ fill = TRUE,
+ stringsAsFactors = FALSE,
+ comment.char = ""
+ )
Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
EOF within quoted string
> str(hit)
'data.frame': 81365 obs. of 1 variable:
$ Group.Sample.Start.Match_len.Read_len.Hit_len.Hit.ID: chr "Normal\tA4\t6064657\t27\t101\t13669\tNC_038931.1 Thermoproteus tenax virus 1 (TTV1) genome\tNC_038931" "Normal\tA0\t6064658\t29\t101\t13669\tNC_038931.1 Thermoproteus tenax virus 1 (TTV1) genome\tNC_038931" "Normal\tA0\t6064659\t28\t101\t13669\tNC_038931.1 Thermoproteus tenax virus 1 (TTV1) genome\tNC_038931" "Normal\tA0\t6064660\t27\t101\t13669\tNC_038931.1 Thermoproteus tenax virus 1 (TTV1) genome\tNC_038931" ...
I have installed Feather in Julia with pkg.add("Feather")
and imported it with using Feather
. I created a dataframe and saved it with Feather.write("/dir/dataframe.feather", df)
and it worked. I can even open it back with df = Feather.read("/dir/dataframe.feather")
and get: julia> nrow(df) 128544
.
The problem is with R. I am using Rstudio to test each step.
I installed the package, imported it with library(feather)
and used it as:
df = read_feather("/dir/dataframe.feather")
and then R/Rstudio simply crashes.
any idea why?
Thank you