I'm trying to follow some of the best practices of the "open science" movement. In my thesis, I've performed all of the analyses in R (a non-proprietary, open-source program for analyzing data), and my datasets are in the non-proprietary CSV format.

I would like to be as transparent as possible, by sharing my datasets and R analysis/code files with my thesis committee, and ultimately with the public once my thesis is finalized and placed in a repository. How can I best do this?

I was thinking about uploading my files to the Open Science Framework (http://osf.io) and citing them with a regular HTTPS link. Once my thesis is finalized, I would then "freeze" them on the OSF website (as I understand, this would prevent post-hoc changes), then get a DOI that points to the frozen files and cite that.

Are there any better options?

  • It seems overly complex. Check out the LaTeX listings package to include code directly in your thesis. Mar 6, 2016 at 1:05
  • 1
    I will check that out, thanks. However, my R code is several thousand lines long, and organized into multiple files per experiment, so I suspect it would be more appropriate to reference externally.
    – Tyler
    Mar 6, 2016 at 1:24
  • 1
    I plan to do this same thing with my research code and data on GitHub.
    – CephBirk
    Mar 6, 2016 at 3:46
  • 3
    If you have not already done so, make sure that your R code is neatly laid out (e.g. using formatR package) and thoroughly commented. The chance of anyone spending the time to read and understand a solid block of impenetrable code is close to zero. Mar 6, 2016 at 9:40
  • There are some quite good examples of how others are doing this in the answers to this question: academia.stackexchange.com/q/87255/417 If you have thousands of lines of R, you should consider to organise them into an R package
    – Ben
    Mar 29, 2017 at 6:05

3 Answers 3


First, best compliments for your intent on open and reproducible research!

Your code and datasets ought to bring you better visibility for your research. GitHub is a good alternative to publish your code. If your datasets involve elements of machine learning you may donate it to the UCI Machine Learning Repository.


Check figshare. I have no complaints, but I still under the free quota.

Recently, I came across more 3 interesting data repository:


I understand that this question is old but allow me to share my opinion. The OSF is one of the stable open data repository, just like Figshare, Zenodo, and many other similar free services. Many scientists have used it and I heard no complaints so far regarding its link or DOI stability over time. So it is very good for students or any scientist to post their dataset and code separately in this repository.

I know that you can also do it the old way by embedding the code and data directly in the document (paper or thesis), but by making them available separately is highly advised to increase the visibility of your work. Other scientist can cite it just like they cite other scientific document, by adding the link and the DOI.

You can always contact OSF team to seek for advise on how to maximise your OSF account or how to cite documents on OSF properly.

Just do it again for your future research, considering you must be graduated by now.

Best wishes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .