Answer: Last Updated: Oct 22, 2026 Views: 8
Yes, it is possible, even recommended. Our guide Publishing research software openly: Advice and best practices contains advice and help regarding the writing, structuring, cleaning, documenting, publishing, and licencing of scientific code with the aim of making it understandable and reusable by others.
The checklist below can be used as a means of self-assessment before uploading to SND to make sure that the code works and that basic information is provided. Doing these checks beforehand is not mandatory but may save time during the review process and help you identify areas of improvement in your code. A general tip is also to ask a colleague to run the code on their computer to check whether it works correctly and to identify any errors.
Five things to check when submitting a dataset with R code
-
All required files are included, and file paths are relative: make sure that all files needed to run your code have been uploaded and that file paths do not refer to locations specific to your computer. For example, replace absolut file paths such as C:\Users\jdoe\research_project\analysis\article2024\mycode\data\data_file.csv with relative file paths such as ../data/data_file.csv.
-
The source code file begins with a header containing key information, including the creator's name, version number, date, and the Digital Object Identifier (DOI) of the associated dataset. The dataset's DOI is generated automatically in DORIS when you create a new data description.
-
The code is accompanied by a licence, preferably an open-source license, that clearly states how others may use, modify, and share it. Licence information can be included in the header of the source code file, in a LICENCE.txt file or in a README.txt file. If your code includes material created by others, make sure you comply with their terms and conditions before publishing.
-
Clear instructions are provided explaining the purpose of the code and how to run it. This information can be included as comments in the source code file, in a separate README.txt file, or both.
-
Information is provided about the R environment used to develop and run your code, including R version and the versions of any packages used. You can generate this information by running sessionInfo() in the R console after executing your script. Include the output in a README.txt file or save it as a separate sessionInfo.txt file and upload it with the associated dataset.
More detailed information about each of the five points above are available in our guide, which also contains advice concerning the actual writing and structuring of the code:
Publishing research software openly: Advice and best practices
The following example of an SLU dataset with R code may serve as inspiration:
Data for: Annual flower strips under the ‘All of Sweden blooms’ initiative - how do they perform for pollinators, natural enemies and herbivores?
Was this helpful? 0 0
