Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-Forge #2622] Add command "fwrite" to faster save csv files #580

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 18 comments
Closed

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Ma Jom; Assigned to: Nobody; R-Forge link

I really love the new command "fread" as it really speeds up the work with large files. It would be great to see a corresponding command for writing CSV files.

Currently, I use a combination of write.csv and as.matrix to speed up this process a bit:
http://stackoverflow.com/questions/10505605/speeding-up-the-performance-of-write-table

@abfleishman
Copy link

Is this in the works? I am dealing with the same problem

@mattdowle
Copy link
Member

@abfleishman @robbyjo We're not working on it currently. Contributions are more than welcome and I'm happy to guide anyone on how to do it. Or, funding would help a lot.

@skanskan
Copy link

I agree, data.table is missing a fwrite functionality.
It would be a great addition.

@minhhahl
Copy link

minhhahl commented May 8, 2015

+1 for fwrite function

1 similar comment
@stanasa
Copy link

stanasa commented May 20, 2015

+1 for fwrite function

@danielsjf
Copy link

I would also really appreciate an fwrite function!

@MichaelChirico
Copy link
Member

Of course I'm all in for this.

@arunsrinivasan
Copy link
Member Author

At this point, as I briefly touched upon during UseR 2015, there's no motivation or incentive to implement fwrite for neither of us. To implement it efficiently is a lot of work, and it comes out of our free time. With the possibility of it being just reimplemented as well in another package (like readr) at some point in time, it doesn't seem like a good investment of our time.

If anyone else is interested in investing their time, please feel free to contact us.

@oseiskar
Copy link
Contributor

oseiskar commented Oct 1, 2015

We have developed a faster function for writing CSV files and achieved > 2x speedups (on a 64-bit Windows machine with an SSD) See this Gist for a proof of concept. I can start working on a pull request with more features if you are interested.

@smartinsightsfromdata
Copy link

@oseiskar code seems very promising.
@mattdowle @arunsrinivasan would you consider a pr for a fwrite on this basis?

@Bohdan-Khomtchouk
Copy link

Not having fwrite to complement fread is like not having write.csv to complement read.csv (or write.table/read.table)

@migueltp
Copy link

migueltp commented Mar 2, 2016

+1 for fwrite function

1 similar comment
@julja
Copy link

julja commented Mar 12, 2016

+1 for fwrite function

@mattdowle
Copy link
Member

@oseiskar @smartinsightsfromdata Sorry I didn't see your comments above in Oct or Nov at the time. Of course (!) we would be delighted to accept PR. But I already wrote above in Oct 2014 that "Contributions are more than welcome" in case that was not already clear, so I don't know why you asked rather than just submitting the PR.
Maybe it was because of our fears expressed above that the effort would be wasted. You may be better off contributing to the so called Hadley-verse since that is what most people (well, on twitter and blogs anyway) jump up and down about. Hadley has the midas touch if that's what you want. But if you wanted to contribute fwrite to data.table, of course it would be accepted. Or create your own new package of course.

@mattdowle
Copy link
Member

fwrite PR merged! Thanks @oseiskar !!

@MichaelChirico
Copy link
Member

Just took the liberty of updating the SO "fast writing" post linked at the head of this thread.

Some more clean-up: @mattdowle you mention the lack of fwrite in this answer, not sure if you prefer to update yourself

@mattdowle
Copy link
Member

Thanks @MichaelChirico. Please do go ahead and update my answers too - I don't mind at all as it saves time. Thanks! Nice detailed answer btw with extensive benchmark.

mattdowle added a commit that referenced this issue Apr 13, 2016
mattdowle added a commit that referenced this issue Apr 13, 2016
mattdowle added a commit that referenced this issue Apr 13, 2016
mattdowle added a commit that referenced this issue Apr 15, 2016
mattdowle added a commit that referenced this issue Apr 15, 2016
mattdowle added a commit that referenced this issue Apr 20, 2016
mattdowle added a commit that referenced this issue Apr 20, 2016
mattdowle added a commit that referenced this issue Apr 23, 2016
mattdowle added a commit that referenced this issue Apr 27, 2016
mattdowle added a commit that referenced this issue Apr 29, 2016
@jangorecki jangorecki added fwrite and removed fread labels Nov 11, 2016
@mattdowle
Copy link
Member

Work on fwrite continued here: #1664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests