Export and repatriation
GDPR, output control and what may leave DST
You have built your dataset and run your analysis (Phases 0–14). What remains is the final step: getting your results safely out of DST.
Data from Statistics Denmark is microdata subject to GDPR and special rules for research data. You cannot copy raw data out — everything must go through DST’s repatriation process.
READ AND RE-READ DST — Rules for repatriation of analysis results →
What may you export?
Yes: - Aggregated tables - Graphs and figures - Model output — coefficients, confidence intervals, p-values
No: - Individual-level data in any form - Cells with fewer than 3 observations (some registers require a minimum of 5) - Results that could identify individuals — directly or indirectly
Scripts are also exported via the repatriation process — not freely. Code/scripts can be repatriated, but go through the same process as result files.
The process — “Hjemtag Filer” in the DDV app
- Save files in your project folder with precise, descriptive filenames — see below
- Upload in the DDV app via “Hjemtag Filer”
- The system automatically scans for potential microdata and flags risks
- Add a comment if a file is flagged — describe precisely what the file contains and why it is aggregated
- Confirm compliance with DST’s confidentiality policy (checkbox)
- Download under “Mit overblik” → your project → “Hjemtagelser”
Use precise filenames and paths — not generic names like output.csv. When the system flags a file, your best defence is a descriptive filename (table1_descriptive_n500.csv) and a clear comment about what the file is. No README is required — describe in the comment field in the DDV app.
Save files to the output folder
When you do not specify a full path in your save command, R saves the file in your working directory — check it with:
getwd() # shows your current working directory, e.g. "E:/workdata/708421/myproject"Save with a full path to make sure the file ends up in the right place:
library(readr) # write_csv
# Replace the path with your project folder:
output_path <- "E:/workdata/[projectnumber]/workspaces/[your-folder]/[project-name]/output/"
# Aggregated table as CSV file:
write_csv(my_table, paste0(output_path, "table1_descriptive.csv"))
# Figure as PNG file (width/height in inches, dpi = resolution):
ggsave(paste0(output_path, "figure1_km.png"),
plot = my_figure, width = 8, height = 6, dpi = 300)
# Model output as text file:
sink(paste0(output_path, "cox_results.txt")) # all subsequent output is written to the file
print(summary(cox_model)) # write results
sink() # stop — output goes back to the consoleRounding
DST requires that counts are sufficiently aggregated. Manual rounding to the nearest 5:
round(count / 5) * 5 # 23 → 25, 12 → 10Checklist before uploading
You have completed the full process
When your results have been repatriated, you have gone all the way — from research question and cohort to analysis-ready dataset and publication-ready results.
- Need to look up a function, a register or a pitfall? → 15 — Reference
- Working on DARTER / project 708421? → DARTER — overview and pipeline